Skip to content

Instantly share code, notes, and snippets.

View fnichol's full-sized avatar

Fletcher Nichol fnichol

View GitHub Profile
@fnichol
fnichol / README.md
Created October 11, 2012 22:02
orderup - Creates a tarball of Chef cookbooks from a Cheffile for chef-solo

orderup

Description

Creates a tarball of Chef cookbooks from a Berksfile or Cheffile for chef-solo.

Installation

Copy the program to your local machine (perhaps ~/bin?) and install Berkshelf or Librarian-Chef:

@fnichol
fnichol / dev-setup-minimal.sh
Created April 8, 2017 16:50
Minimal Development Setup
#!/bin/sh
# shellcheck disable=SC2039
set -eu
if [ -n "${DEBUG:-}" ]; then set -x; fi
main() {
init
ensure_root
info "Starting setup"
@fnichol
fnichol / unfuck-vmware-net.sh
Created February 13, 2014 19:32
"Fix" VMware Network
#!/usr/bin/env bash
set -e
[ -n "$DEBUG" ] && set -x
banner() { printf -- "-----> $*\n"; }
banner "Restarting VMware networking"
banner "Stoping networking"
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
@fnichol
fnichol / init_gitflow.rake
Created March 25, 2011 03:12
Register rake tasks off `rake init' to setup your initial development environment after a fresh git clone. N.B. better to make these actions idempotent so you can run it more than once without fear.
namespace :init do
task 'gitflow_init' do
preconditions = [
%{git config --get gitflow.branch.master >/dev/null 2>&1},
%{git config --get gitflow.branch.develop >/dev/null 2>&1},
%{git config --get gitflow.prefix.feature >/dev/null 2>&1},
%{git config --get gitflow.prefix.release >/dev/null 2>&1},
%{git config --get gitflow.prefix.hotfix >/dev/null 2>&1},
%{git config --get gitflow.prefix.support >/dev/null 2>&1},
%{git config --get gitflow.prefix.versiontag >/dev/null 2>&1}
@fnichol
fnichol / sles11-mongod.init
Created September 28, 2010 03:59
mongod init.d script for SLES
#!/bin/sh
#
# /etc/init.d/mongod
#
# Modified from: https://build.opensuse.org/package/view_file?file=mongod.init&package=mongodb&project=home:phprus:server:database&srcmd5=94d608ffe3ba91c10261c49ba16f3db1
#
### BEGIN INIT INFO
# Provides: mongod
# Required-Start: $syslog $local_fs $network
# Required-Stop: $syslog $local_fs $network
@fnichol
fnichol / README.md
Created March 30, 2011 21:17
Chef Bootstrapper For SuSE/SLES

Chef Bootstrapper For SuSE/SLES

Installation

Note: Run this script as the root user (no sudo calls are used in the script).

You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:

zypper --non-interactive install curl

@fnichol
fnichol / chefdk-ubuntu-12.04.sh
Created June 3, 2014 16:14
ChefDK Installation Scripts
#!/usr/bin/env sh
set -e
if [ -d /opt/chefdk ]; then
echo "ChefDK installed in /opt/chefdk, quitting" >&2
exit 0
fi
url="https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.1.0-1_amd64.deb"
pkg="/tmp/`basename \`echo $url\``"
@fnichol
fnichol / ruby-install-prof.sh
Created February 15, 2015 23:00
Build an MRI Ruby version for ruby-prof using ruby-install
# Build an MRI Ruby version ready for ruby-prof (https://github.com/ruby-prof/ruby-prof)
VERSION=2.2.0
ruby-install \
--install-dir ~/.rubies/ruby-prof-$VERSION \
-p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/$VERSION/railsexpress/01-zero-broken-tests.patch \
-p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/$VERSION/railsexpress/02-improve-gc-stats.patch \
-p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/$VERSION/railsexpress/03-display-more-detailed-stack-trace.patch \
-p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/$VERSION/railsexpress/04-backport-401c8bb.patch \
@fnichol
fnichol / README.md
Created February 5, 2012 20:50
Vagrant apt-cacher-ng

Vagrant apt-cacher-ng Box

Simple and easy, just:

mkdir apt-cacher-ng && cd apt-cacher-ng
curl -LO https://raw.github.com/gist/1747868/Vagrantfile
vagrant up

Tail the logs perhaps?