This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
(bundle check || bundle --local) && bundle exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') << { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') << { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class rsyslog { | |
include logrotate::rsyslog | |
package { 'rsyslog': | |
ensure => installed | |
} | |
service { 'rsyslog': | |
ensure => running | |
} |