Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
# Set user
/set nick <NICKNAME>
/set real_name <REAL NAME>
# Connect to user
## Non-SSL (6665, 6666, 6667, 8000, 8001, 8002)
/connect irc.freenode.net <PORT>
## SSL (6697, 7000, 7070)
/connect irc.freenode.net <PORT>
@josephmilla
josephmilla / stylebot
Last active August 29, 2015 14:16
Stylebot Facebook
{"www.facebook.com":{"_enabled":true,"_rules":{"div.clearfix.hasRightCol.homeWiderContent.homeFixedLayout.hasExpandedComposer.newsFeedComposer._5r-_":{"display":"none"},"#stream_pagelet":{"display":"none"},"div._4-u2._5v6e.cardRightCol._268y":{"display":"none"},"div._64b.fixed_elem":{"display":"none"}}}}
@josephmilla
josephmilla / haiku
Last active August 29, 2015 14:15 — forked from friggeri/haiku
haiku = ->
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
@josephmilla
josephmilla / .osx
Last active November 25, 2015 14:16
OSX Sensible Setup
#!/usr/bin/env bash
# ~/.osx — https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@josephmilla
josephmilla / keystroke
Created October 2, 2014 19:18
Echo keystroke
stty echo
public static void main(String[] args) {
List<Person> list = null;
Collections.sort(list, decending(getComparator(NAME_SORT, ID_SORT)));
}
enum PersonComparator implements Comparator<Person> {
ID_SORT {
public int compare(Person o1, Person o2) {
return Integer.valueOf(o1.getId()).compareTo(o2.getId());
}},
NAME_SORT {
public int compare(Person o1, Person o2) {
return o1.getFullName().compareTo(o2.getFullName());
}};
>>> import numpy as np
>>> A = np.mat('[1 2;3 4]')
>>> A
matrix([[1, 2],
[3, 4]])
>>> A.I
matrix([[-2. , 1. ],
[ 1.5, -0.5]])
>>> b = np.mat('[5 6]')
>>> b
@josephmilla
josephmilla / valgrind.md
Last active August 29, 2015 14:06
Valgrind - Check for memory leaks
valgrind --leak-check=full --show-reachable=yes ./program
@josephmilla
josephmilla / bang.md
Created September 16, 2014 21:24
Bang Bang - Command Recall in Linux

Bang Bang - Command Recall in Linux

Repeating Commands

Repeat last command

!!

Repeat last command that started with x

!x