Skip to content

Instantly share code, notes, and snippets.

David Strauß stravid

Block or report user

Report or block stravid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:609381
yum install httpd.i386 httpd-devel.i386 libxml2-devel.i386 libxslt-devel.i386\
openssl-devel.i386 pcre-devel.i386 bzip2-devel.i386 curl-devel.i386\
libjpeg-devel.i386 libpng-devel.i386 freetype-devel.i386 gmp-devel.i386\
libc-client-devel.i386 libmcrypt-devel.i386 mysql-devel.i386 unixODBC-devel.i386\
postgresql-devel.i386 sqlite-devel.i386 aspell-devel.i386 net-snmp-devel.i386 ncurses-devel.i386
'./configure' \
'--disable-cgi' \
View gist:615012
Add a /etc/yum.repos.d/CentOS-Testing.repo file providing the followings:
# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.
View deploy.rb
# RVM bootstrap
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require 'rvm/capistrano'
set :rvm_ruby_string, '1.9.2@shuffler'
set :rvm_type, :user
# bundler bootstrap
require 'bundler/capistrano'
unless Capistrano::CLI.ui.agree("Are you sure you want to redeploy? (yes/no): ")
View gist:1228655
Test =
print: ->
console.log("Test.print called")
if module.exports?
module.exports = Test
@Test = Test
View user.rb
class User < ActiveRecord::Base
include Clearance::User
before_create :generate_api_key
attr_accessible :time_zone, :email, :password
validates_uniqueness_of :api_key
def generate_api_key
self.api_key = Digest::SHA1.hexdigest( + rand(12341234).to_s)[1..24]
stravid / coffeescript.html
Created Jan 24, 2012
Starterkit for CoffeeScript
View coffeescript.html
<script type="text/javascript" src=""></script>
<h1>Hello CoffeeScript!</h1>
View gist:1678353
canvas = document.getElementById 'canvas'
canvas.width = 1024
canvas.height = 700
context = canvas.getContext '2d'
points = []
isMoving = false
$('canvas').on 'touchstart', (event) -> onTouchStart event
$('canvas').on 'touchmove', (event) -> onTouchMove event
View routes.rb
Slotcars::Application.routes.draw do
root :to => 'tracks#index'
get '/tracks/:id' => 'tracks#index'
get '/tracks/new' => 'tracks#index'
View gist:2006109
#= require helpers/namespace
#= require embient/ember-routemanager
namespace 'slotcars'
slotcars.RouteManager = Ember.RouteManager.extend
wantsHistory: true # use html5 push state
delegate: null
stravid / gist:2024450
Created Mar 12, 2012
Sublime Text 2 - Useful Shortcuts
View gist:2024450

Sublime Text 2 – Useful Shortcuts (OS X)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.


Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
You can’t perform that action at this time.