Skip to content

Instantly share code, notes, and snippets.

View rjocoleman's full-sized avatar

Robert Coleman rjocoleman

  • Christchurch, New Zealand
View GitHub Profile
$ ls -al /etc/php5/cli/conf.d/
total 12
drwxr-xr-x 2 root root 4096 Jul 16 14:59 .
drwxr-xr-x 7 root root 4096 Jul 16 13:19 ..
lrwxrwxrwx 1 root root 25 Jul 16 13:19 10-pdo.ini -> ../mods-available/pdo.ini
lrwxrwxrwx 1 root root 26 Jul 16 13:19 20-curl.ini -> ../mods-available/curl.ini
lrwxrwxrwx 1 root root 24 Jul 16 13:20 20-gd.ini -> ../mods-available/gd.ini
lrwxrwxrwx 1 root root 30 Jul 16 13:19 20-memcache.ini -> ../mods-available/memcache.ini
lrwxrwxrwx 1 root root 28 Jul 16 13:20 20-mysqli.ini -> ../mods-available/mysqli.ini
lrwxrwxrwx 1 root root 27 Jul 16 13:20 20-mysql.ini -> ../mods-available/mysql.ini
// ==UserScript==
// @name Failed labels quick links
// @description Failed labels quick links
// @include https://shipping.etailer.co.nz/parcels/*/edit
// @version 0.3
// @namespace https://gist.github.com/rjocoleman/6036802
// @updateURL https://gist.github.com/rjocoleman/6036802/raw
// @downloadURL https://gist.github.com/rjocoleman/6036802/raw
// ==/UserScript==
$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Thu Jan 31 13:48:53 2013
vagrant@precise64:~$ cd /vagrant
vagrant@precise64:/vagrant$ pwd
/vagrant
vagrant@precise64:/vagrant$ ./ppa_release.sh
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
~/foobar$ ./ppa_release.sh
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro
dpkg-buildpackage: source package ioncube-loader
dpkg-buildpackage: source version 4.4.1ubuntu50
dpkg-buildpackage: source changed by Robert Coleman <launchpad@robert.net.nz>
dpkg-source -I.git --before-build -bar
ip() {
local WIFI=`ipconfig getifaddr en0 2> /dev/null`
local ETHERNET=`ipconfig getifaddr en1 2> /dev/null`
local EXT=`curl -s http://checkip.dyndns.org/ | grep -o '[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9]*'`
if [ "$ETHERNET" != "" ]; then
echo -n -e "Ethernet:\t "
echo -e $ETHERNET
fi
if [ "$WIFI" != "" ]; then
echo -n -e "Wifi:\t\t "
<table class="container">
<tr>
<td>
<!-- Hero Row //start -->
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<!-- Inliner Build Version 4a491cbbdbf75d9c4e9bed94bc553ed45f2d0603 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
</head>
<body style="width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; color: #222222; font-family: 'Helvetica', 'Arial', sans-serif; font-weight: normal; text-align: left; line-height: 19px; font-size: 14px; margin: 0; padding: 0;"><style type="text/css">
a:hover {
color: #2795b6 !important;
<!-- Hero Row //start -->
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<!-- Hero Row: Hero //start -->
<center>
<td class="panel">
<center>
@rjocoleman
rjocoleman / gist:7853529
Last active December 30, 2015 16:19
Using knife-solo with Chef 11.8.2 on Windows. Making use of Opscode's embedded MinGW (aka RubyInstaller DevKit).

Current as of Chef 11.8.2
Opscode bundle RubyInstaller DevKit with Chef as their embedded environment. RubyInstaller DevKit is a basically a packaging of MinGW/MSYS. It's intended for Chef internal use only and does not include everything we need (but it's close).

Knife-Solo dependencies:

  • Chef
  • A SSH server (communication)
  • rsync (to transfer cookbooks etc)

Please note this is highly dependent on what Opscode bundle with Chef. These won't be supported by Opscode and could completely break your chef-client installation. Updates to Chef will likely remove rsync and it will need to be reinstalled. Opscode might stop using DevKit entirely without warning and break this whole technique.

@rjocoleman
rjocoleman / gist:8312639
Last active January 2, 2016 13:49
AppleScript to open Steam in 'big picture' mode. If steam is already running it convert to 'big picture' mode. If a steam game is running in the foreground then nothing should happen. Relies on `pgrep` which comes along with 10.8+.
on isRunningAndSteam(theProcess)
try
set result to do shell script "
if grep -q \"\\-steam\" <<< `/bin/ps -xo command -p \"\\`/usr/bin/pgrep " & theProcess & "\\`\"`; then
echo true
else
echo false
fi"
return result as boolean
end try