#vim shortcuts I use.md
0 - home
$ - end
k - up
j - down
| #!/bin/sh | |
| MYVERSION="0.2.0e" | |
| # | |
| # Sakis3G All-in-one script | |
| # Copyright (c) 2009, 2010 Sakis Dimopoulos (sakis3g @domain sakis3g.org) | |
| # Under GNU GPL v2. | |
| # | |
| # URL: http://www.sakis3g.org/ | |
| # License: http://www.gnu.org/licenses/gpl.txt | |
| # |
| ssh root@192.168.0.111 | |
| apt-get install ppp | |
| mkdir /root/umtskeeper | |
| cd /root/umtskeeper | |
| wget https://gist.github.com/rjsteinert/6273133/raw/988fa477f9f6a1c2fd5ea24dbd6001ff1b413b96/sakis3G | |
| chmod +x sakis3g | |
| wget "http://mintakaconciencia.net/squares/umtskeeper1/src/umtskeeper.tar.gz" | |
| tar -xzvf umtskeeper.tar.gz | |
| chmod +x umtskeeper | |
| mkdir /home/pi/umtskeeper |
| document.getElementsByTagName('input')[1].value = "#treehouse"; |
#vim shortcuts I use.md
0 - home
$ - end
k - up
j - down
Creating files in the browser with #javascript.md
Interesting plugin using some abandonded saveAs() spec
The Blob docs for FF -> https://developer.mozilla.org/en-US/docs/Web/API/Blob?redirectlocale=en-US&redirectslug=DOM%2FBlob
Create a file and put it in a download link... window.URL = window.URL || window.webkitURL;
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Find and Replace</title> | |
| <script src="http://code.jquery.com/jquery-2.0.3.js"></script> | |
| </head> |
Callbacks are rampant in Javascript, this can cause what's known as "Callback Hell", or as I like to call. Rat nests. In the following example the "rat nest" is not that hard to follow along with, and that will be the case when your program is simple. But imagine when your program grows to have many rat nests, perhaps even the rat nests become intertwined. Messy.
/*
* Callback hell example
*/
function yell(text, callback) {| var httpProxy = require('http-proxy') | |
| var options = { | |
| router: { | |
| 'mydomain.com/api': '127.0.0.1:8800', // -> Additional API possibly from an Express App | |
| 'mydomain.com/*': '127.0.0.1:5984', // -> CouchDB binded to the base so it behaves just like a CouchDB | |
| } | |
| } |