Skip to content

Instantly share code, notes, and snippets.

View wadtech's full-sized avatar

Peter Mellett wadtech

View GitHub Profile
@wadtech
wadtech / index.html
Last active August 29, 2015 14:18
Nightmarish floaty layout thing: Doing this sort of layout gets me every time// source http://jsbin.com/natusu
<html>
<head>
<meta name="description" content="Doing this sort of layout gets me every time">
<script src="//code.jquery.com/jquery-2.1.1.min.js"><\/script>
<meta charset="utf-8">
<title>Nightmarish floaty layout thing</title>
</head>
<body>
<section>
@wadtech
wadtech / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
#! /bin/sh
### BEGIN INIT INFO
# Provides: chef-client
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Initscript to run chef-client daemon
# Description: Starts the chef-client daemon automatically upon start
### END INIT INFO
@wadtech
wadtech / Result
Created November 23, 2012 21:14
example spec and result
Page
is invalid without a permalink
is invalid without content
has a valid factory
must have a unique permalink
URL
should match the permalink
# coloured by pass/fail/pending
@wadtech
wadtech / Get-DistributionGroups.ps1
Created November 15, 2012 12:52
Script to find distribution group memberships of a user.
# List-DistributionGroups.ps1
# Peter Mellett 2012
#
# Find all distribution groups of a user and list them to the console
#
# Example:
# .\List-DistributionGroups.ps1 aperson@company.com
#
# Name
# ====
@wadtech
wadtech / vagrant up [info]
Created August 28, 2012 20:10
Vagrant up with chef solo
[default] Mounting shared folders...
INFO interface: info: -- v-root: /vagrant
[default] -- v-root: /vagrant
INFO ssh: Execute: printf /vagrant (sudo=false)
INFO ssh: Execute: mkdir -p /vagrant (sudo=true)
INFO ssh: Execute: mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-root /vagrant (sudo=true)
INFO ssh: Execute: chown `id -u vagrant`:`id -g vagrant` /vagrant (sudo=true)
INFO ssh: Execute: [ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=/vagrant (sudo=true)
INFO interface: info: -- v-csc-1: /tmp/vagrant-chef/chef-solo-1/cookbooks
[default] -- v-csc-1: /tmp/vagrant-chef/chef-solo-1/cookbooks
@wadtech
wadtech / vagrant (bash)
Created August 28, 2012 20:10
Vagrant up with chef solo
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-csc-1 /home/vagrant/tmp/vagrant-chef/chef-solo-1/cookbooks
@wadtech
wadtech / chef_solo_bootstrap.sh
Created April 12, 2012 19:40 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo for Ubuntu Precise
#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
make
sudo make install