Skip to content

Instantly share code, notes, and snippets.

View cerico's full-sized avatar
🌊
doing lines of javascript innit

garethrobertlee cerico

🌊
doing lines of javascript innit
View GitHub Profile
@cerico
cerico / 0_reuse_code.js
Created November 14, 2015 09:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cerico
cerico / vrun.sh
Created August 9, 2017 06:55
run commands in vagrant guest eg: vagrant ssh -c 'make deploy'
#!/bin/bash
vrun () {
eval 'vagrant ssh -c'" \"${@:1} \""
}
iconv -f UTF-16LE emails_pt1.json -t UTF-8 > e1.json
iconv -f UTF-16LE emails_pt2.json -t UTF-8 > e2.json
mongoimport --db navigator --collection emails --drop --file e1.json --jsonArray
mongoimport --db navigator --collection emails --file e2.json --jsonArray
puts Readline::HISTORY.entries.each { |c| puts c }
@cerico
cerico / build-server.sh
Last active September 11, 2024 16:04
pm2 rails nginx setup
#!/bin/bash
###--- Basics ---###
sudo apt-get update
sudo apt-get install -y tree software-properties-common git-core openssl libssl-dev git vim curl zsh
###--- Node ---###
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
@cerico
cerico / email.rb
Last active January 9, 2019 08:22
puts ARGV[0].gsub(/[\r\n]|>|<+/m, "\n").squeeze("\n").gsub("\n", "\r\n")
@cerico
cerico / .block
Created July 5, 2019 18:37
fresh block
license: mit
@cerico
cerico / .block
Created July 5, 2019 18:37
fresh block
license: mit
@cerico
cerico / .block
Created July 12, 2019 19:22
fresh block
license: mit
@cerico
cerico / .block
Last active July 21, 2019 13:38
Multi Area Chart with time axis
license: mit