Skip to content

Instantly share code, notes, and snippets.

Fletcher Nichol fnichol

Block or report user

Report or block fnichol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fnichol
fnichol / build-bootstrap-hab-x86_64-linux-kernel2.sh
Created Jul 19, 2018
Build an initial `hab` binary for the `x86_64-linux-kernel2` package target
View build-bootstrap-hab-x86_64-linux-kernel2.sh
# Change directory to the root of your `habitat-sh/habitat` repo checkout
# cd /path/to/habiatat-sh/habitat
# Cleanup any existing Studio instances--keep it clean to be safe!
hab studio rm
# Enter the studio with the `core` key and prevent a Supervisor from starting
env HAB_ORIGIN=core HAB_STUDIO_SUP=false hab studio enter
# Build a static `hab` CLI for the `x86_64-linux-kernel2` target
View keybase.md

Keybase proof

I hereby claim:

  • I am fnichol on github.
  • I am fnichol (https://keybase.io/fnichol) on keybase.
  • I have a public key ASA2PW1FW2eqANMPo6CweZrD7BL4Quf2hR1ypMcblTODlwo

To claim this, I am signing this object:

@fnichol
fnichol / shell.sh
Created Apr 23, 2013
Test Kitchen with bats - A Lightning Guide
View shell.sh
SUITE_NAME=default
# create a bats subdirectory under your desired suite
mkdir -p test/integration/$SUITE_NAME/bats
# create an initial "canary" bats test file
# more examples at:
# * https://github.com/fnichol/chef-rvm/tree/master/test/integration/rubies/bats
# * https://github.com/fnichol/chef-ruby_build/tree/master/test/integration/alltherubies/bats
# * https://github.com/sstephenson/bats
@fnichol
fnichol / README.md
Last active Feb 27, 2018
Building a Mac OS X Vagrant box with Bento
View README.md

The Mac/Bento templates use Tim Sutton's amazingly awesome os-vm-templates project to prepare a .dmg that can perform an unattended install of Mac OS X 10.7 through to 10.11. You'll need a copy of the Mac OS X .app on locally on disk, so we'll assume that it's installed under /Applications from the App Store.

Clone the os-vm-templates project and run the prepare_iso.sh program to produce the disk image.

git clone https://github.com/timsutton/osx-vm-templates.git
cd osx-vm-templates
sudo prepare_iso/prepare_iso.sh "/Applications/Install OS X El Capitan.app" out
@fnichol
fnichol / .kitchen.yml
Last active Feb 14, 2018
Test Kitchen Encrypted Data Bags
View .kitchen.yml
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true
platforms:
- name: ubuntu-12.04-solo
driver_config:
box: opscode-ubuntu-12.04
provisioner: chef_solo
@fnichol
fnichol / README.md
Created Oct 11, 2012
orderup - Creates a tarball of Chef cookbooks from a Cheffile for chef-solo
View README.md

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 Apr 8, 2017
Minimal Development Setup
View dev-setup-minimal.sh
#!/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 Feb 13, 2014
"Fix" VMware Network
View unfuck-vmware-net.sh
#!/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 Mar 25, 2011
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.
View init_gitflow.rake
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 Sep 28, 2010
mongod init.d script for SLES
View sles11-mongod.init
#!/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
You can’t perform that action at this time.