This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arduino IDE: | |
- download from https://www.arduino.cc/en/Main/Donate | |
USB -> Serial drivers: | |
- download CH340G Driver from https://wiki.wemos.cc/downloads | |
- download CP210x Driver from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers | |
Open Arduino IDE | |
> Preferences: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/munki/munkiwebadmin/wiki/MunkiWebAdmin-Ubuntu-14.04-LTS-Setup | |
echo Installing Apache | |
/usr/bin/apt-get install -y apache2 | |
echo Creating Munki repo in Apache web root | |
/bin/mkdir -p /var/www/munki/pkgsinfo \ | |
/var/www/munki/catalogs \ | |
/var/www/munki/manifests \ | |
/var/www/munki/pkgs \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://www.hipchat.com/docs/apiv2/method/send_room_notification | |
AUTH_TOKEN="" # generate an auth token from the hipchat admin interface | |
ROOM_ID=1 # get the room id from the hipchat admin interface | |
HIPCHAT_URL="https://api.hipchat.com/v2/room" # or self hosted hiphat URL | |
FROM="some sender" | |
MESSAGE="some message" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// interpolate between colors { r, g, b } where 0 < t < 1 | |
// when assigning a color for a number in a range larger than 0-1, scale the number to the 0-1 range first | |
function lerpRGB(color1, color2, t) { | |
let color = {}; | |
color.r = color1.r + ((color2.r - color1.r) * t); | |
color.g = color1.g + ((color2.g - color1.g) * t); | |
color.b = color1.b + ((color2.b - color1.b) * t); | |
return color; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stats.stackexchange.com/questions/281162/scale-a-number-between-a-range | |
function scale(n, oldMin, oldMax, newMin, newMax) { | |
return ((n - oldMin) / (oldMax - oldMin)) * (newMax - newMin) + newMin; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.docker.com/engine/reference/commandline/docker/ | |
name = container_name | |
dbname = db_name | |
version = 0.1 | |
# build the container (with name:tag) | |
build: | |
docker build -t $(name):$(version) . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug: | |
- https://facebook.github.io/react-native/docs/debugging | |
- ios simulator: (shake gesture), debug JS remotely | |
- android simulator: (cmd+m) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Math for programmers, http://www.elegantcoding.com/2011/06/math-for-programmers-tng.html | |
How To Design Programs, https://htdp.org/ | |
Structure And Interpretation of Computer Programs, http://mitpress.mit.edu/sites/default/files/sicp/index.html | |
Category Theory, https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ | |
Pivot Table with Java Streams, https://dzone.com/articles/java-pivot-table-using-streams | |
Why you should know just a little AWK, https://gregable.com/2010/09/why-you-should-know-just-little-awk.html | |
How to Write a Spelling Corrector, http://norvig.com/spell-correct.html | |
Writing a Unix shell, https://indradhanush.github.io/blog/writing-a-unix-shell-part-1/ | |
Metaballs, https://varun.ca/metaballs/ | |
Simulating Vines, https://maissan.net/articles/simulating-vines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c < test.html)\r\n\r\n"; cat test.html; } | nc -l 8081 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: some-program | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Some Program | |
### END INIT INFO |