View python_installation_notes
Install These Tools:
https://github.com/pyenv/pyenv
https://github.com/pyenv/pyenv-virtualenv
Then in .zshrc add:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
View escape_newline.sh
awk '{printf "%s\\n", $0}' file
View replace_expo_urls.rb
#!/usr/bin/env ruby
require 'json'
require 'rexml/document'
include REXML
def fix_exshell_json(filename, url)
json_file = JSON.parse File.read(filename)
json_file['developmentUrl'] = url
File.open(filename, 'w') { |file| file.puts(json_file.to_json) }
end
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));
}