git clone https://github.com/tj/n.git
cd n
# install it to a home folder instead of /usr/local
PREFIX=$HOME/local make install
This file contains 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 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
This file contains 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
// To get the code git clone it as shown below: | |
// git clone https://gist.github.com/lambrospetrou/7b582954357778a42cc6e98477d32910.git gohttp | |
// | |
// Run either by `go run gohttp.go` | |
// Or do a `go install` and run it from your path directly with `gohttp` | |
// Example: `gohttp -d someDir/` | |
package main | |
import ( | |
"flag" |
This file contains 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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os/exec" | |
) |
I hereby claim:
- I am lambrospetrou on github.
- I am lambrospetrou (https://keybase.io/lambrospetrou) on keybase.
- I have a public key ASAEbUDrWOOF8uJRJ8KryBorw3PBqRKwXttx_jv_Hsb5cgo
To claim this, I am signing this object:
This file contains 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
#lang racket | |
(define (qsrt iarr lt) | |
(cond | |
[(< 1 (length iarr)) | |
(let ( | |
[pivot (first iarr)] | |
[gt (lambda (l r) (not (or (lt l r) (equal? l r))))]) | |
(append | |
(qsrt (filter (lambda (x) (lt x pivot)) iarr) lt) |
This file contains 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
; The first line of the input is considered to be the heading! | |
; It accepts either one command line argument with the CSV file path | |
; or it reads the input from `stdin`. | |
#lang racket | |
(require csv-reading) | |
(define (getInputPort) | |
(cond | |
[(> (vector-length (current-command-line-arguments)) 0) |
This file contains 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 | |
set -e | |
INSTALL_DIR="$HOME/local" | |
# erlang FROM SOURCE - http://erlang.org/doc/installation_guide/INSTALL.html | |
# You need to have OpenSSL for :crypto, wxWidgets for :wx, etc. | |
#ERL_VERSION="20.2" | |
#wget "http://www.erlang.org/download/otp_src_$ERL_VERSION.tar.gz" |
This file contains 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 | |
set -e | |
SOURCE_DIR="the-dir-to-save" | |
S3_BUCKET="s3://your-s3-bucket/with/path" | |
TIMENOW="$(date --rfc-3339=seconds | tr ' ' '_' | tr ':' '-' | tr '+' '.')" | |
FILENAME="$SOURCE_DIR.$TIMENOW.tgz" |
OlderNewer