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 'yaml' | |
require 'fileutils' | |
job = ARGV[0] | |
job_spec = YAML.load_file(File.join('jobs', job, 'spec')) | |
packages = job_spec['packages'] | |
work_dir = 'docker' | |
FileUtils.mkdir_p(work_dir) |
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
# -*- coding: utf-8 -*- | |
# otr - WeeChat script for Off-the-Record IRC messaging | |
# | |
# DISCLAIMER: To the best of my knowledge this script securely provides OTR | |
# messaging in WeeChat, but I offer no guarantee. Please report any security | |
# holes you find. | |
# | |
# Copyright (c) 2012-2014 Matthew M. Boedicker <matthewm@boedicker.org> | |
# Nils Görs <weechatter@arcor.de> | |
# Daniel "koolfy" Faucon <koolfy@koolfy.be> |
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
# All unfinished items from a list called "Buy" | |
cat ~/Downloads/wunderlist-20140214-23-56-27.json | \ | |
jq -r '([.lists[] | {key: .id, value: .title}] | from_entries) as $lists | | |
.tasks | | |
map(select(.completed_at == null)) | | |
map({title, list: $lists[.list_id]}) | | |
map(select(.list == "Buy")) | | |
.[].title' |
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
cat some_stdout | ruby -ruri -e "puts URI.extract(ARGF.read, 'http').join(' ')" | xargs open |
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
find . -name *.gem -printf "%f\n" | sort | uniq | sed 's/\([0-9a-z_-]*\)-\([0-9.]*\)\.gem$/gem "\1", "= \2"/g' |
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
Deploying Hubot IRC on Cloud Foundry | |
git clone git://github.com/github/hubot.git | |
cd hubot | |
npm install | |
mkdir ~/hubot_deploy |
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_gcc | |
build_package_patch_sslv2() { | |
wget -q -O - https://raw.github.com/gist/3758689/6363d446805334c1815c18094f5892f0b37cbd30/remove_sslv2.patch | patch -p0 | |
} | |
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" | |
install_package "ruby-1.9.2-p180" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz" patch_sslv2 standard | |
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz" ruby |
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
--- ext/openssl/ossl_ssl.c.back 2012-09-20 14:48:47.000000000 -0700 | |
+++ ext/openssl/ossl_ssl.c 2012-09-20 14:48:53.000000000 -0700 | |
@@ -107,9 +107,9 @@ | |
OSSL_SSL_METHOD_ENTRY(TLSv1), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_server), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_client), | |
- OSSL_SSL_METHOD_ENTRY(SSLv2), | |
- OSSL_SSL_METHOD_ENTRY(SSLv2_server), | |
- OSSL_SSL_METHOD_ENTRY(SSLv2_client), | |
+ // OSSL_SSL_METHOD_ENTRY(SSLv2), |
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
# Writing to Linux virtual consoles to simulate user input: | |
s = "ls\n" | |
open('/dev/tty1','w') do |f| | |
s.each_char do { |c| f.ioctl(0x5412, c) } | |
end | |
# From the shell: | |
echo 7 | ruby -e "open('/dev/tty1', 'w') { |o| \$stdin.each_char { |c| o.ioctl(0x5412, c) } }" |
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
# paste contents of clipboard to emacs scratch buffer | |
tell application "Emacs" | |
activate | |
tell application "System Events" | |
keystroke "x" using {control down} | |
keystroke "b*scratch*" | |
keystroke return | |
keystroke ">" using {option down} | |
keystroke return |