Skip to content

Instantly share code, notes, and snippets.

View huntlyc's full-sized avatar

Huntly Cameron huntlyc

View GitHub Profile
@huntlyc
huntlyc / .htaccess
Created April 1, 2013 16:56
Project: Creating A RESTful PHP Web Service With Tonic
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !dispatch\.php$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^api/([^/\.]+)/([^/\.]+)/?$ dispatch.php [L,QSA]
</IfModule>
@huntlyc
huntlyc / .htaccess
Last active December 15, 2015 15:59
Wordpress setup Ubuntu 12.10
#This goes in your #server-config
<VirtualHost *:80>
ServerName bobswordpress.dev
ServerAdmin [email protected]
DocumentRoot /var/www/bobswordpress.dev/
ServerAlias www.bobswordpress.dev
DirectoryIndex index.html index.php
<Directory /var/www/bobswordpress.dev/>
Options FollowSymLinks
@huntlyc
huntlyc / gist:2889818
Created June 7, 2012 16:16 — forked from JeffreyWay/gist:2889230
Simple PHP Quiz
// Fun little quiz
Assuming this string: "January 5th, 2012"
In the shortest amount of code possible, place:
- 'January' within a $month variable
- '5th' within a $day variable
- '2012' within a $year variable.