Skip to content

Instantly share code, notes, and snippets.

@cmer
cmer / cjax.js.coffee
Created March 9, 2012 20:54
CJAX - History.js-PJAX hybrid that doesn't suck in IE
# This is a work in progress. I use it in production and it works very well, but use at your own risk!
@initCJAX = () ->
History = @History
$ = @jQuery
document = @document
return false unless @History.enabled
$ ->
contentSelector = ".main"
@jlindley
jlindley / b.bash
Created January 18, 2012 21:34
Bundle check then bundle install if needed, then bundle exec.
#!/usr/bin/env bash
(bundle check || bundle --local) && bundle exec "$@"
@glaforge
glaforge / build.gradle
Created November 25, 2011 16:04 — forked from Dierk/build.gradle
build.gradle for setting up a new gradle-based project
apply plugin:'groovy'
apply plugin:'idea'
repositories { mavenCentral() }
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.4'
}
task makeDirs(description:'make all dirs for project setup') << {
@Dierk
Dierk / build.gradle
Created October 7, 2011 22:43
build.gradle for setting up a new gradle-based project
apply plugin:'groovy'
apply plugin:'idea'
repositories { mavenCentral() }
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.2'
}
task makeDirs(description:'make all dirs for project setup') << {
@mruoss
mruoss / day2_1.rb
Created August 13, 2011 15:29
Seven Languages in Seven Weeks - Ruby
#!/usr/bin/env ruby
# print array in slices using each
a = (1..16).to_a
(0..3).each do |i|
p a[4*i..4*i+3]
end
# print array in slices using each_slice
a.each_slice(4) {|s| p s}
@jlgeering
jlgeering / .gitignore
Created July 28, 2011 06:36
Seven Languages in Seven Weeks: Ruby
out.txt
class rsyslog {
include logrotate::rsyslog
package { 'rsyslog':
ensure => installed
}
service { 'rsyslog':
ensure => running
}