Skip to content

Instantly share code, notes, and snippets.

@dedene
dedene / app.js
Created February 11, 2012 22:09 — forked from alexburner/app.js
Proof of Concept for Titanium implementation of Facebook/Path sidebar
Titanium.UI.setBackgroundColor('red');
// root
var rootWin = Ti.UI.createWindow({
title: 'Root Win',
backgroundColor: 'gray',
tabBarHidden: true,
navBarHidden: true
});
@dedene
dedene / gist:2655946
Created May 10, 2012 21:15 — forked from skorianez/gist:1308103
JCrop + Carrierwave
# https://github.com/gzigzigzeo/carrierwave-meta
# Integrating CarrierWave with JCrop
# Let implement the behavior like at this demo: deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail
# The uploader:
class CropUploader < SobakaUploader
include CarrierWave::Meta
# Crop source is a source image converted from original which could be bigger than source area (left image in the example).
version :crop_source do
@dedene
dedene / spotify.applescript
Created July 10, 2012 19:12 — forked from elliottkember/spotify.applescript
Spotify Applescript
property baseURL : "http://statusboard.dev/song?"
if application "Spotify" is running then
tell application "Spotify"
set theTrack to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set theurl to spotify url of the current track
try
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\""
@dedene
dedene / rails-backbone-test-setup.md
Created September 2, 2012 22:43 — forked from smakman/rails-backbone-test-setup.md
Setting up a Rails backbone project with Jasmine, RSpec, Capybara, Guard and Spork

Rails backbone test setup

This gist describes how to setup a rails backbone project with testing frameworks.

Gemfile

Example Gemfile to start with.

@dedene
dedene / rails-backbone-test-setup.md
Created September 2, 2012 22:43 — forked from adragomir/rails-backbone-test-setup.md
Setting up a Rails backbone project with Jasmine, RSpec, Capybara, Guard and Spork

Rails backbone test setup

This gist describes how to setup a rails backbone project with testing frameworks.

Gemfile

Example Gemfile to start with.

@dedene
dedene / workers.rake
Created September 6, 2012 00:04 — forked from rajib/workers.rake
Rake taks to launch multiple Resque workers in development/production with simple management included
# Rake task to launch multiple Resque workers in development/production with simple management included
require 'resque/tasks' # Require Resque tasks
namespace :workers do
# = $ rake workers:start
#
# Launch multiple Resque workers with the Rails environment loaded,
# so they have access to your models, etc.
@dedene
dedene / gist:4219853
Created December 5, 2012 21:57
Blockenspiel Segmentation Fault (MRI-1.9.3-p327/falcon patch)
/Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:481: [BUG] Segmentation fault
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
-- Control frame information -----------------------------------------------
c:0059 p:---- s:0255 b:0255 l:000254 d:000254 CFUNC :unmix
c:0058 p:0065 s:0250 b:0250 l:000242 d:000249 BLOCK /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:481
c:0057 p:0019 s:0247 b:0247 l:000246 d:000246 METHOD <internal:prelude>:10
c:0056 p:0419 s:0244 b:0243 l:000242 d:000242 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:477
c:0055 p:0327 s:0227 b:0227 l:000226 d:000226 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:371
c:0054 p:0322 s:0219 b:0219 l:000218 d:000218 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:298
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@dedene
dedene / 0_README.md
Last active December 17, 2015 23:59 — forked from nilcolor/0_README.md

ruby-1.9.3-p429 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets from https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.