Skip to content

Instantly share code, notes, and snippets.

View jaymzcd's full-sized avatar
🍜
Maybe cooking some pad thai

jaymz campbell jaymzcd

🍜
Maybe cooking some pad thai
View GitHub Profile
@jaymzcd
jaymzcd / nginx.conf
Last active August 29, 2015 14:07 — forked from phpdude/nginx.conf
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<!-- Twitter Bootstrap -->
@jaymzcd
jaymzcd / gist:3748713
Created September 19, 2012 09:37
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
======================================================
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10
======================================================
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu
8.10. The article is targeted at a production environment, but keep in mind
this is a more generalized environment. You may have different requirements,
but this article should at least provide the stepping stones.
The article will use distribution packages where nesscary. As of 8.10 the
@jaymzcd
jaymzcd / admin.py
Created February 27, 2012 11:20 — forked from ohrstrom/admin.py
event plugin / django-cms
from django.contrib import admin
from dummy.models import *
class EventAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['title']}),
('Date information', {'fields': ['date_start', 'date_end']}),
]
@jaymzcd
jaymzcd / pre-commit.sh
Created July 5, 2011 14:53 — forked from mikesusz/pre-commit.sh
a git pre-commit hook for compass compiling of sass to css
#!/bin/sh
#
# this pre-commit script uses compass to compile and compress stylesheet partials
compass compile wp-content/themes/mytheme/ -s compact --force --no-line-comments
wait $!
git add wp-content/themes/mytheme/style.css