Skip to content

Instantly share code, notes, and snippets.

View edwardloveall's full-sized avatar
👈
there he is

Edward Loveall edwardloveall

👈
there he is
View GitHub Profile
#!/usr/bin/env ruby
## brew install ffmpeg imagemagick
## gem install ArgsParser
require 'rubygems'
require 'ArgsParser'
parser = ArgsParser.parser
parser.bind(:input, :i, 'input video file')
parser.bind(:output, :o, 'output gif file', 'out.gif')
City latitude Country rank population longitude
Tokyo 35.670479 Japan 1 28,025,000 139.740921
Mexico City 19.32792 Mexico 2 18,131,000 -99.19109
Mumbai 19.11105 India 3 18,042,000 72.87093
S·o Paulo 0.3617 Brazil 4 17, 711,000 -52.147511
New York City 40.71455 USA 5 16,626,000 -74.7124
Shanghai 31.247709 China 6 14,173,000 121.472618
Lagos 6.43918 Nigeria 7 13,488,000 3.42348
Los Angeles 34.5329 USA 8 13,129,000 -118.245009
Calcutta 22.52667 India 9 12,900,000 88.34616
<select id="countries" name="countries">
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
@edwardloveall
edwardloveall / style.css
Created February 26, 2013 02:18
Custom Reddit Style based on the [Reddit Minimal Safari Extension](http://www.cornellcampbell.com/extensions/posts/3/reddit-minimal/)
#header {
border-bottom: none;
margin-bottom: 25px;
}
#header, #header > div {
background-color: transparent;
}
#header-bottom-right {
@edwardloveall
edwardloveall / planter.rb
Last active December 17, 2015 05:59 — forked from ttscoff/planter.rb
ruby script to create a directory structure from indented data
#!/usr/bin/ruby
=begin
Planter v1.3
Brett Terpstra 2013
ruby script to create a directory structure from indented data.
Three ways to use it:
- Pipe indented (tabs or 2 spaces) text to the script
- e.g. `cat "mytemplate" | planter.rb
- Create template.tpl files in ~/.planter and call them by their base name
# Loosely based off http://blog.willj.net/2011/05/31/setting-up-postgresql-for-ruby-on-rails-development-on-os-x/
# Alternatively, look at: https://www.codefellows.org/blogs/how-to-install-postgresql
# Last updated 7/25/13
brew install postgres
initdb /usr/local/var/postgres
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
javascript:words=%5B"a","able","about","account","acid","across","act","addition","adjustment","advertisement","after","again","against","agreement","air","all","almost","among","amount","amusement","and","angle","angry","animal","answer","ant","any","apparatus","apple","approval","arch","argument","arm","army","art","as","at","attack","attempt","attention","attraction","authority","automatic","awake","baby","back","bad","bag","balance","ball","band","base","basin","basket","bath","be","beautiful","because","bed","bee","before","behaviour","belief","bell","bent","berry","between","bird","birth","bit","bite","bitter","black","blade","blood","blow","blue","board","boat","body","boiling","bone","book","boot","bottle","box","boy","brain","brake","branch","brass","bread","breath","brick","bridge","bright","broken","brother","brown","brush","bucket","building","bulb","burn","burst","business","but","butter","button","by","cake","camera","canvas","card","care","carriage","cart","cat","cause","certain","chain","chalk
@edwardloveall
edwardloveall / Readme.md
Last active August 29, 2015 13:56
Open Spotify web player in Spotify app

Spotify Open web player in Spotify App Bookmarklet

This bookmarklet will open a Spotify link in the Spotify app. To install, create a new bookmarklet and paste the contents of the spotify.js file as the URL. Use something like Open in Spotify for the name.

for i in (1...100) {
if (i % 3 == 0 && i % 5 == 0) {
println("fizzbuzz")
} else if i % 3 == 0 {
println("fizz")
} else if i % 5 == 0 {
println("buzz")
} else {
println(i)
}
// Processing motion blur
// 'time' runs from 0 to 1
// ignore everything above the /////////
// by Dave @ beesandbombs
int[][] result;
float time;
void setup() {
setup_();