Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View padolsey's full-sized avatar

James Padolsey padolsey

View GitHub Profile
@kauffmanes
kauffmanes / install_anaconda.md
Last active April 19, 2024 03:30
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li
@bendc
bendc / holy-grail.html
Last active December 15, 2017 19:50
Holy Grail Layout using CSS Grid
<!doctype html>
<title>Holy Grail Layout</title>
<style>
body {
display: grid;
grid-template-rows: 100px 1fr 100px;
grid-template-columns: 200px 1fr 200px;
min-height: 100vh;
margin: 0
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
/**
* Sum of all elements including nested arrays.
*
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
* MIT Style License
*/
[1, 2, [3, 4], 5, [6, [7, 8]]].reduce(function collect(previous, current) {
return (
(Array.isArray(previous) ? previous.reduce(collect) : previous) +
@davidaurelio
davidaurelio / .profile
Last active December 20, 2015 11:09
bash helper function to make debugging node cli programs easier.
node-debug () {
PROGRAM="$(which $1)" # make sure we get an absolute path for programs in PATH
shift # remove the original program argument
set -- "$PROGRAM" "$@" # prepend the program path
node --debug-brk $@ & # start node in paused debug mode, send to background
node-inspector # start node inspector
kill %% # kill the background task (if still running)
}
fractalModule =function(stdlib){
"use asm";
var pow = stdlib.Math.pow;
var abs = stdlib.Math.abs;
var atan2 = stdlib.Math.atan2;
var cos = stdlib.Math.cos;
var sin = stdlib.Math.sin;
function mandlebrot(cx, cy, maxIter) {
cx = +cx;
cy = +cy;
var Point = function(x, y) {
if (arguments.length == 1)
{
this.x = (x >> 12) & 0xFFF;
this.y = (x) & 0xFFF;
}
else
{
this.x = x;
this.y = y;
@sym3tri
sym3tri / ES5 Newnewss
Created April 20, 2012 04:18
New features of ES5 summarized
- Trailing commas are ok
- No reserved words for property names
- NaN, Infinity, undefined : are all constants
- parseInt() defaults to radix 10
- /regexp/ produces new reg ex object every time
- JSON.parse(), JSON.stringify()
- Function.prototype.bind
- String.prototype.trim
- Array.prototype.every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some,
- Date.now()
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@kig
kig / workcrew.js
Created September 2, 2011 11:03
WorkCrew - a WebWorker work queue library
/*
WorkCrew - a WebWorker work queue library
Usage:
// Create an 8 worker pool using worker.js.
var crew = new WorkCrew('worker.js', 8);
// Do something whenever a job is completed.
// The result object structure is