View zoos_and_animals.viz
digraph SimplestDiagrams {
Zoo1
"Zoo1" -> "Cat"
"Zoo1" -> "Dog"
Zoo2
"Zoo2" -> "Cat"
"Zoo2" -> "Crow"
Zoo3
View gist:fdda2557ee2a28881f5a33356391f42c

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

This method does not add your OAuth token to Gemfile.lock. It uses bundle config to store your credentials, and allows you to configure Heroku to use environment variables when deploying.

  1. Generate an OAuth token from GitHub
View gist:a8efc00c016b1f31f07aafb18a7fe9b1

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

This method does not add your OAuth token to Gemfile.lock. It uses bundle config to store your credentials, and allows you to configure Heroku to use environment variables when deploying.

  1. Generate an OAuth token from GitHub
View Weather Script
#!/bin/bash
# I live in Arlington so default it there :)
value=${1:-22209}
curl -4 http://wttr.in/$value
View Keybase
### Keybase proof
I hereby claim:
* I am jkeam on github.
* I am jonnyman9 (https://keybase.io/jonnyman9) on keybase.
* I have a public key whose fingerprint is 4430 D491 0B7F 1EAF 65E5 3645 99A2 EF07 7123 9327
To claim this, I am signing this object:
View promise.js
'use strict';
const http = require('https');
function docs() {
console.log('The Promise object is used for deferred and asynchronous computations. A Promise represents an operation that hasn\'t completed yet, but is expected in the future.');
console.log("pending: initial state, not fulfilled or rejected.\n fulfilled: meaning that the operation completed successfully.\n rejected: meaning that the operation failed.");
console.log('Great notes from Mozilla: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise');
}
function takesLongTime(url, resolve, reject) {
View nesting
.jon_container {
float: left;
color: #323a13;
.border(1px,#afc945);
.gradient(#afc945, #c8da64);
.common;
span {
.my-span;
.border-dashed(1px,rgba(255,255,255,0.3));
}
View calendar.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Select a Date Range</title><title>jQuery UI Datepicker - Select a Date Range</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type='text/javascript'>
/*Any variables set outside of your function are known as global variables, which can be used in any function. Here, outside of your main function, I'm setting a global variable for $minDate, a variable that will represent the Start Date and a variable for $maxDate, the variable that will represent the End Date.*/
View fix_eclipse_proj_references.sh
#!/bin/bash
(
#directory to cd into
#/cygdrive/f/blah
directory=$1
#suffix to add to .project and .classpath
#1.0-SNAPSHOT
suffix=$2
View GroovyExcelParser.groovy
import org.apache.poi.ss.usermodel.*
import org.apache.poi.hssf.usermodel.*
import org.apache.poi.xssf.usermodel.*
import org.apache.poi.ss.util.*
import org.apache.poi.ss.usermodel.*
import java.io.*
class GroovyExcelParser {
//http://poi.apache.org/spreadsheet/quick-guide.html#Iterator