Skip to content

Instantly share code, notes, and snippets.

@oker1
oker1 / jenkins-slave
Last active December 25, 2015 16:09 — forked from bols-blue/jenkins-slave
# defaults for jenkins continuous integration server
SLAVE_NAME=slave1
JENKINS_ARGS="-jnlpUrl http://test.lnc.jp:8080/computer/$SLAVE_NAME/slave-agent.jnlp"
# jenkins home location
JENKINS_HOME=/opt/jenkins-slave
# location of the jenkins war file
JENKINS_WAR=$JENKINS_HOME/slave.jar
@oker1
oker1 / post-checkout
Last active December 21, 2015 01:49 — forked from lyrixx/post-checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR="\x1B[0m"
@oker1
oker1 / chef-roles-to-json-task.rb
Created December 18, 2011 18:41 — forked from timdiggins/chef-roles-to-json-task.rb
rake task to convert existing ruby roles to json
# ADD this to Rakefile and run it by issuing rake roles.to_json
ROLE_DIR = File.expand_path(File.join(TOPDIR, "roles"))
namespace :roles do
desc "Convert ruby roles from ruby to json, creating/overwriting json files."
task :to_json do
Dir.glob(File.join(ROLE_DIR, '*.rb')) do |rb_file|
role = Chef::Role.new
role.from_file(rb_file)
json_file = rb_file.sub(/\.rb$/,'.json')
@oker1
oker1 / videotar.sh
Created October 15, 2011 08:58 — forked from dnet/videotar.sh
MTV videotár player (Mac OS + VLC)
#!/bin/sh
# MTV videotar player
if [ $# -lt 1 ]; then
echo "Usage: $0 <videotar URL> [additional parameters to player]" >&2
exit 1
fi
CURL="curl -silent"
URL=$($CURL "$1" | sed -n 's/^.*\(http.*wmv\).*$/\1/p')