Skip to content

Instantly share code, notes, and snippets.

View waymondo's full-sized avatar

justin talbott waymondo

View GitHub Profile
@rodrigorm
rodrigorm / README.md
Created August 8, 2011 01:43
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://gist.github.com/raw/1131062/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems:

@geddski
geddski / nesting.js
Created January 14, 2012 05:08
helper function for nesting backbone collections.
function nestCollection(model, attributeName, nestedCollection) {
//setup nested references
for (var i = 0; i < nestedCollection.length; i++) {
model.attributes[attributeName][i] = nestedCollection.at(i).attributes;
}
//create empty arrays if none
nestedCollection.bind('add', function (initiative) {
if (!model.get(attributeName)) {
model.attributes[attributeName] = [];
@dirkschmid
dirkschmid / compass-retina-sprites.sass
Created March 21, 2012 12:30 — forked from thulstrup/compass-retina-sprites.scss
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png")
$sprites-retina: sprite-map("sprites-retina/*.png")
=sprite-background($name)
background-image: sprite-url($sprites)
background-position: sprite-position($sprites, $name)
background-repeat: no-repeat
display: block
height: image-height(sprite-file($sprites, $name))
width: image-width(sprite-file($sprites, $name))
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
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:

@jackrusher
jackrusher / skewer-coffee.el
Last active December 19, 2017 19:20
The tiniest possible skewer-mode extension for coffeescript support.
;;; skewer-coffee.el --- skewer support for live-interactive Coffeescript
(defun skewer-coffee-eval (coffee-code)
"Requests the browser to evaluate a coffeescipt string."
;; XXX should escape double quote characters
(skewer-eval (concat "CoffeeScript.eval(\""
(s-replace "\n" "\\n" (s-trim coffee-code))
"\");")
#'skewer-post-minibuffer))
@afeld
afeld / gist:5704079
Last active November 27, 2023 15:43
Using Rails+Bower on Heroku
@staltz
staltz / introrx.md
Last active June 26, 2024 10:24
The introduction to Reactive Programming you've been missing
@redguardtoo
redguardtoo / .ctags.sample
Last active March 21, 2024 16:55
my ~/.ctags. Please note this is configuration for Exuberant Ctags. If you use Universal Ctags, you need run `ctags --options="$HOME/.ctags" -e -R` in shell at least once and fix all the warnings.
--c++-kinds=+p
--fields=+iaS
--extra=+q
--exclude=*/.hg/*
--exclude=.hg/*
--exclude=*/.cvs/*
--exclude=.cvs/*
--exclude=*/.svn/*
--exclude=.svn/*
--exclude=*/.git/*
@a3ammar
a3ammar / color-picker
Last active March 21, 2022 09:20
Use OS X Color Picker in Emacs
(defun custom-color--choose-action (widget &optional _event) ; this function is only needed if you want to use color-picker in Easy Customization
"customize `widget-color--chose-action' to not split the screen"
(list-colors-display
nil nil
`(lambda (color)
(when (buffer-live-p ,(current-buffer))
(widget-value-set ',(widget-get widget :parent) color)
(pop-to-buffer ,(current-buffer))))))
(defun nscolor2hex (color)