Skip to content

Instantly share code, notes, and snippets.

View roidrage's full-sized avatar
🌱
Planting seeds

Mathias Meyer roidrage

🌱
Planting seeds
View GitHub Profile
{
"id": 1,
"number": "1",
"status": null,
"started_at": null,
"finished_at": null,
"status_message": "Passed",
"commit": "62aae5f70ceee39123ef",
"branch": "master",
"message": "the commit message",
@roidrage
roidrage / forkify.rb
Created January 23, 2014 19:33
A little script to run a command wrapped in a timeout. The command will be terminated after the timeout expired
max_runtime = ARGV.shift.to_i
pid = Kernel.fork do
`#{ARGV.join(" ")}`
end
trap :CHLD do
puts 'Child exited'
exit
end
@roidrage
roidrage / meatballs.md
Last active December 5, 2019 22:44
Americanized version of my meatballs recipe

The @roidrage meatballs extravaganza.

The secret ingredient to this recipe is letting everything stew for a few hours. First the tomato sauce, requires at least 90 minutes to 2 hours. Then the meatballs in the sauce another 90 minutes. The longer the better.

Once the meatballs are in the sauce, the more time you give them, the more delicious flavor will seep from the meat into the sauce, and vice versa. I'd recommend giving it a total of four hours for maximum taste extraction.

The long stew ensure that the fluids have evaporated and that you're left with the tastiest meatballs you've ever had.

Ingredients (serves four hungry people):

before_script:
- sudo sed -e '$d' --in-place /etc/hosts
- cat /etc/hosts
127.0.1.1 precise64
# host on which base box was built. Erlang services that use Mnesia
# (like RabbitMQ) may create DB directories with this hostname in the name
# during provisioning and if we change hostname later, they will have all
# kinds of obscure issues. MK.
# backwards compatibility. MK.
# The following lines are desirable for IPv6 capable hosts
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
require 'bundler/installer'
module ::Bundler
class Installer < Environment
MAX_RETRIES = 3
def install_gem_from_spec(spec, standalone = false)
retries = 1
# Download the gem to get the spec, because some specs that are returned
# by rubygems.org are broken and wrong.
@roidrage
roidrage / james.rb
Last active December 30, 2015 07:09
payload = data["payload"]
url = "https://magnum.travis-ci.com/#{payload['repository']['owner_name']}/#{payload['repository']['name']}/builds/#{payload['id']}"
http://www.amazon.com/Power-Habit-Why-What-Change-ebook/dp/B006WAIV6M/
http://www.amazon.com/Drive-Surprising-Truth-About-Motivates-ebook/dp/B0033TI4BW/
http://www.amazon.com/How-Win-Friends-Influence-People-ebook/dp/B0044XUINS/
http://www.amazon.com/Small-Giants-Companies-Choose-Instead-ebook/dp/B000OCXFYC/
http://www.amazon.com/Field-Guide-Understanding-Human-Error-ebook/dp/B00BL0OZ0E/
@roidrage
roidrage / .travis.yml
Created October 18, 2013 22:12
MongoDB's APT repositories have changed their structure, causing apt-get update to fail. As a temporary fix, apply this change to your .travis.yml. We'll work on a patch to apply a permanent fix to the repositories in place.
before_install:
- sudo rm /etc/apt/sources.list.d/mongodb.list
- sudo apt-get update
cache:
directories:
- ~/.cache/bower