Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
@josephmilla
josephmilla / Monokai-Terminal
Created June 20, 2014 14:55
Monokai theme for terminal and iterm.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
@josephmilla
josephmilla / symlink
Created June 20, 2014 14:56
Symbolic link
@josephmilla
josephmilla / git-aliases
Created June 20, 2014 14:57
Aliases for git
# Git Aliases
alias gco='git checkout'
alias gfo='git fetch origin'
alias grhod='git reset --hard origin/develop'
alias grhom='git reset --hard origin/master'
alias grv='git remote -v'
alias gtx='open /Applications/GitX.app'
alias gla='git log --oneline --graph --decorate --abbrev-commit'
alias grh='git reset --hard'
alias gcam='git commit -a -m'
@josephmilla
josephmilla / if-else-shortcut.html
Created June 20, 2014 15:08
Shortcut for if-else in javascript --> (parameters.length > 3) ? "parametersScrollableList" : "pop-up-parameters"
<% if (parameters.length > 0) { %>
<div class="row-fluid">
<div class="<%= (parameters.length > 3) ? "parametersScrollableList" : "pop-up-parameters" %>">
<% var sortedParams = _.sortBy(parameters, function(param) { return param.attributes.title; }); %>
<% sortedParams = _.uniq(sortedParams); %>
<% _.each(sortedParams, function(param) { %>
<div class="info-window-paramValue"><%= param.attributes.title %></div>
<% }); %>
</div>
</div>
@josephmilla
josephmilla / git-buffer-size
Created June 20, 2014 15:27
Increase git buffer size
git config http.postBuffer 524288000 #Set to 500MB
@josephmilla
josephmilla / opening-new-panes
Last active August 29, 2015 14:02
Opening new panes in iTerm 2
# Opening new panes in iTerm
newPaneDown()
{
osascript -e "
tell application \"iTerm\"
make new terminal
tell the current terminal
activate current session
tell the last session
tell i term application \"System Events\" to key code 2 using {shift down, command down}
@josephmilla
josephmilla / emoticon-control
Last active August 29, 2015 14:02
Documentation for enabling ZSH
For Mac: Hit CTRL + CMD + Space 🙈 (Monkey see, monkey do!)
@josephmilla
josephmilla / utc-vs-valueof
Created June 30, 2014 16:10
UTC vs. valueOf() Getting the Epoch time (number of milliseconds since January 1 , 1970 00:00:00 UTC)
var d = new Date(1995, 08, 20);
var UTCDate_ms = Date.UTC(1995, 08, 20, 5, 0, 0, 0);
var UTCDate = new Date(UTCDate_ms);
var valueOfDate_ms = d.valueOf();
var valueOfDate = new Date(d.valueOf())
alert("Date: " + d + "\nUTC: " + UTCDate_ms + " " + UTCDate + "\nvalueOf(): " + valueOfDate_ms + " " + valueOfDate);
@josephmilla
josephmilla / lineChart.html
Created June 30, 2014 20:52
Line chart for cosine (switched xy).
<!DOCTYPE html>
<meta charset="utf-8">
<link href="../src/nv.d3.css" rel="stylesheet" type="text/css">
<style>
body {
overflow-y:scroll;
}
// Admin control? Add sudo.
sudo port -command-
// Check version
port version
// Cleaning old ports
port clean --all installed
port -f uninstall inactive