Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
@josephmilla
josephmilla / grep
Created September 6, 2014 20:15
GREP
// Search and replace strings
grep -rl 'ZSH' ./ | xargs sed -i 's/ZSH/DOTFILES/g'
@josephmilla
josephmilla / prime_numbers.md
Created September 2, 2014 02:33
All about prime numbers
@josephmilla
josephmilla / traceroute
Created August 24, 2014 02:23
Traceroute
traceroute google.com
@josephmilla
josephmilla / inside-borders.css
Created August 8, 2014 00:34
Inside borders - Adding borders will add extra height/width, this will not.
blah
{
box-shadow: 0px 0px 0px 2px #000000;
box-sizing: border-box;
}
@josephmilla
josephmilla / diff.js
Created July 28, 2014 15:01
JS Array Difference
Array.prototype.diff = function(a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
////////////////////
// Examples
////////////////////
[1,2,3,4,5,6].diff( [3,4,5] );
// => [1, 2, 6]

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@josephmilla
josephmilla / killing-process
Created July 14, 2014 15:25
Killing process
// Grep the PID
ps aux | grep jekyll
// List process by port
lsof -wni tcp:4000
// Kill the process
kill PID
- http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered
// Upgrading Node.js via NPM
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
// Checking Node.js version
node -v
@josephmilla
josephmilla / vim
Created July 8, 2014 16:43
Vim Commands
Text Entry Commands (Used to start text entry)
a Append text following current cursor position
A Append text to the end of current line
i Insert text before the current cursor position
I Insert text at the beginning of the cursor line