Skip to content

Instantly share code, notes, and snippets.

View plukevdh's full-sized avatar
👌
Nice

Luke van der Hoeven plukevdh

👌
Nice
View GitHub Profile
@plukevdh
plukevdh / prod-setup.sh
Last active August 29, 2015 14:01
Shell helpers for sharing setups between dev and prod .rvmrc files
setup_env() {
if [[ -f ".env" ]]; then
for line in `cat .env`; do export $line; done
echo "Loaded .env file from this directory"
fi
}
bundled_commands=(foreman rackup rake rspec ruby shotgun thin pry)
_bundler-installed() {
@jodosha
jodosha / class_loading_benchmark.rb
Last active August 29, 2015 14:04
Lotus::Utils vs ActiveSupport benchmarks
#!/usr/bin/env ruby
require 'benchmark'
require 'rubygems'
require 'active_support/core_ext/string/inflections' # v4.1.4
require 'lotus/utils/class' # v0.2.0
TIMES = (ENV['TIMES'] || 1_000_000).to_i
class Foo
end
@mefellows
mefellows / BundleConfig.ps1
Last active December 25, 2023 23:33
Sysprepped Windows AMI using Packer
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
foreach ($element in $xmlElement.Property)
{
if ($element.Name -eq "AutoSysprep")
{
$element.Value="Yes"
}
@nzroller
nzroller / git-pr-cleanup
Created August 19, 2016 06:00
Github squash-merge PR local cleanup
#!/bin/sh
# Delete local branches whose upstream has been removed
# (useful for Github squashed and merged branches)
# WARNING: git branch -D will force delete branches!
git branch -vv | grep ' gone' | cut -d' ' -f1-3 | xargs -i git branch -D {}