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
#!/bin/bash | |
server=<server and port> | |
token=<your token> | |
job_name=$(basename `readlink -f $GIT_DIR` .git) | |
job_url=http://${server}/job/${job_name} | |
echo "Trigger jenkins build ${job_name} at ${job_url}" | |
exec wget --quiet ${job_url}/build?token=${token} > /dev/null |
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
require 'benchmark' | |
require 'SecureRandom' | |
measurement = Benchmark.measure do | |
(0..10000).each { puts SecureRandom.uuid.to_s } | |
end |
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
puts JSON.pretty_generate( | |
JSON.parse( | |
group.to_json(:include => | |
{ :filter_rules => | |
{:include => | |
{ | |
:filter_rule_action => {:except => [:updated_at, :created_at]}, | |
:filter_rule_condition => {:except => [:updated_at, :created_at]} | |
}, | |
:except => [:updated_at, :created_at]}}, |
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
diff --git a/rsync.c b/rsync.c | |
index b040a67..d6abae4 100644 | |
--- a/rsync.c | |
+++ b/rsync.c | |
@@ -496,16 +496,22 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, | |
#endif | |
#ifdef SUPPORT_XATTRS | |
- if (am_root < 0) | |
- set_stat_xattr(fname, file, new_mode); |
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
import dbus | |
import os | |
from subprocess import call | |
def pulse_bus_address(): | |
if 'PULSE_DBUS_SERVER' in os.environ: | |
address = os.environ['PULSE_DBUS_SERVER'] | |
else: | |
bus = dbus.SessionBus() | |
server_lookup = bus.get_object("org.PulseAudio1", "/org/pulseaudio/server_lookup1") |
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
require 'dbus' | |
class DBus::Pulseaudio | |
attr_accessor :socket_path, :connection | |
OBJECTS = { | |
:core => ['org.PulseAudio.Core1','/org/pulseaudio/core1'] | |
} |
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
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- | |
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/vbox' |
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
\set ON_ERROR_STOP 1 |
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
require 'veewee' | |
# see veewee/test/build_realtest.rb | |
@ve=Veewee::Environment.new({ :definition_dir => '<definitions dir>' }) | |
box = @ve.providers["virtualbox"].get_box('sgg') | |
box.console_type(['foobar']) |