Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
<tbody><tr class="r0 lastrow">
<td class="leftalign cell c0" style=""><a href="../user/view.php?id=4&amp;course=1">alice jones</a></td>
<td class="leftalign cell c1" style="">ajones@example.com</td>
<td class="leftalign cell c2" style=""></td>
<td class="leftalign cell c3" style=""></td>
<td class="left align cell c4" style="">Never</td>
@josephmilla
josephmilla / 0_reuse_code.js
Created June 20, 2014 14:43
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
@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 / 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 / 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