Skip to content

Instantly share code, notes, and snippets.

View jeffrydegrande's full-sized avatar

Jeffry Degrande jeffrydegrande

View GitHub Profile
@jeffrydegrande
jeffrydegrande / GIF-Screencast-OSX.md
Created December 17, 2016 03:54 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jeffrydegrande
jeffrydegrande / project-web-reload.conf
Created September 28, 2012 01:58 — forked from potatosalad/project-web-reload.conf
Upstart + Bluepill + Unicorn with hot restart
# /etc/init/project-web-reload.conf
pre-start script
initctl restart project-web
sleep 15
end script
exec /usr/local/rvm/bin/default_bluepill restart
; a quick attempt at doing the same thing in clojure could for example something like
(defpartial input [name]
[:tr
[:td
[:input {:name name}]]])
(defpartial edit-task-form [& inputs]
[:div.generic.lightbox
[:table
@jeffrydegrande
jeffrydegrande / setup-statsd.sh
Created April 1, 2012 01:54 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use
group :development, :test do
gem 'ruby-debug', :platforms => :ruby_18
gem 'ruby-debug19', :platforms => :ruby_19
end

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe 'Machinist' do
models = Dir[File.expand_path(File.dirname(__FILE__) + '/../app/models/*.rb')].
map{|file| File.basename(file, '.rb') } - %w{mailer}
models.map{ |model| model.classify.constantize }.each do |model|
it "should have a blueprint for the #{model} model" do
model.make.should be_instance_of(model)
end