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
// Processing motion blur
// 'time' runs from 0 to 1
// ignore everything above the /////////
// by Dave @ beesandbombs
int[][] result;
float time;
void setup() {
setup_();
@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
#!/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')
@edwardloveall
edwardloveall / rails_centOS_setup.mdown
Created August 6, 2012 23:40 — forked from bricker/rails_centOS_setup.mdown
Get a Rails app running on vanilla CentOS (5 or 6) via Nginx & Passenger in minutes

Setup RVM/Ruby, Nginx/Passenger, and Rails in minutes on vanilla CentOS (5 or 6)

July 1, 2012

Based on articles at http://articles.slicehost.com/centos

This gist only covers the steps that are necessary to get a Rails app running quickly via RVM, nginx and Passenger. It disregards security in many cases (such as RVM & iptables)! Go through the articles above for more on that.

Please note that I wrote this after I had already got it all working, so I apologize if

#!/usr/bin/ruby
require 'time'
def format_time(seconds)
hours = (seconds / 3600).to_i
minutes = ((seconds % 3600) / 60).to_i
seconds = (seconds % 60).to_i
minutes = "0#{minutes}" if minutes < 10
seconds = "0#{seconds}" if seconds < 10
@edwardloveall
edwardloveall / hack.sh
Last active October 4, 2015 11:27 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#