Skip to content

Instantly share code, notes, and snippets.

View trq's full-sized avatar

Tony R Quilkey trq

  • thorpesystems
  • Sydney, Australia
View GitHub Profile
sculpin:
raw:
- "bower_components/*"
sculpin_posts:
permalink: "blog/:filename/"
@trq
trq / gist:7814691
Last active December 30, 2015 10:18
<?php
class CalDay
{
protected $date;
protected $week;
protected $id;
public function setId($id)
{
@trq
trq / gist:7805165
Last active December 30, 2015 08:49
<?php
class CalDay
{
protected $date;
protected $week;
protected $id;
public function setId($id)
{
Host github.com
hostname github.com
IdentityFile ~/.ssh/key
load_ssh_agent() {
local keys="$@"
local tmp=~/.ssh-agent
if [ -e $tmp ] ; then
. $tmp
fi
ssh-add -l > /dev/null
@trq
trq / gist:6742011
Created September 28, 2013 13:21
php lint git-hook
#!/bin/bash
git diff --cached --name-status --diff-filter=ACMR | while read STATUS FILE; do
if [[ "$FILE" =~ ^.+(php|inc)$ ]]; then
php -l "$FILE" 1> /dev/null
if [ $? -ne 0 ]; then
echo "Aborting commit due to files with syntax errors" >&2
exit 1
fi
fi
class php
{
$packages = [
"php5",
"php5-cli",
"php5-mysql",
"php5-dev",
"php5-mcrypt",
"php5-gd",
"php5-curl",
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
@trq
trq / gist:6017160
Last active December 19, 2015 20:59
# I have a command "opm" which takes, for example argument like:
# opm lfs-base/gcc-4.2 configure
#
# The first argument represents a build script in the format of <category>/<package>-<version>
#
# These build scripts are stored within /var/opm/opms/ in a structure similar to:
# .
# |-- lfs-base
# | |-- autoconf
# | | |-- 2.69.opm
<?php
// Some logger interface
interface LoggerInterface
{
public function log($message);
}
// Some class that relies upon the LoggerInterface interface