Skip to content

Instantly share code, notes, and snippets.

View ogrrd's full-sized avatar

Owen Gerrard ogrrd

View GitHub Profile
@ogrrd
ogrrd / dnsmasq on macOS.md
Last active April 30, 2024 12:23
Setup dnsmasq on macOS for developer DNS
@ogrrd
ogrrd / SSH auto complete.md
Created October 4, 2013 08:26
Tab out your SSH config or known hosts!

Git info in your bash prompt

Edit ~/.bash_profile and add the following

# ssh
if [ -f ~/.bash_ssh ]; then
        . ~/.bash_ssh
fi
@ogrrd
ogrrd / Cake Composer.md
Last active July 15, 2024 22:03
Install Cake 2.x with Composer

Install CakePHP 2.x with Composer

Remove the main CakePHP lib directory

$ cd /path/to/your/website
$ rm -Rf ./lib

Add the following composer.json file

@ogrrd
ogrrd / Some coding style rules.md
Last active December 19, 2015 05:59
Code rules

Some rules on coding style

Carriage return unless its the only line of code in that control structure

<?php
$result = $tags->filter(function($v) use ($type) {
    return $v->getType() === $type;
});
@ogrrd
ogrrd / Handy Varnish commands.md
Last active October 20, 2022 07:12
Handy Varnish commands

Handy Varnish commands

See what Varnish is currently processing

$ varnishlog

Show the referer (sic) header for requests

@ogrrd
ogrrd / Git info in bash.md
Last active October 26, 2018 10:00
Git info in your bash prompt

Git info in your bash prompt

Edit ~/.bash_profile and add the following

# git
if [ -f ~/.bash_git ]; then
    . ~/.bash_git
fi
@ogrrd
ogrrd / dnsmasq OS X.md
Last active November 20, 2024 09:30
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@ogrrd
ogrrd / Mac Dev Setup.md
Last active November 12, 2020 22:16
Installing nginx, PHP and MySQL on OS X Mavericks

Installing a Web Developer setup on OS X Mavericks

Install Command Line Tools

This is a requirement for brew in the next step. You can install XCode and then install Command Line Tools through the XCode preferences, or you can install just the Command Line Tools.

Install Command Line Tools

$ xcode-select --install