$ rails g model User
belongs_to
has_one
#!/bin/bash | |
DJANGO_VERSION=1.4 | |
VENV="django$DJANGO_VERSION" | |
# create virtualenv: "django<version>" e.g. django1.4 | |
mkdir lib | |
cd lib | |
virtualenv --system-site-packages $VENV | |
cd $VENV |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# Base box to build off, and download URL for when it doesn't exist on the user's system already | |
config.vm.box = "wagtail-base-v0.1" | |
config.vm.box_url = "http://downloads.torchbox.com/wagtail-base-v0.1.box" | |
# You can also build from a vanilla precise32 box, although it'll take longer |
// jQuery.naturalWidth / jQuery.naturalHeight plugin for (already-loaded) images | |
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy! | |
(function($) { | |
function img(url) { | |
var i = new Image; | |
i.src = url; | |
return i; | |
} |
<IfModule mod_fastcgi.c> | |
AddHandler fastcgi-script .fcgi | |
</IfModule> | |
<IfModule mod_fcgid.c> | |
AddHandler fcgid-script .fcgi | |
</IfModule> | |
Options +FollowSymLinks +ExecCGI | |
RewriteEngine On |
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
# it is forked from https://github.com/xijo/reverse-markdown/blob/master/reverse_markdown.rb | |
require 'rexml/document' | |
require 'benchmark' | |
include REXML | |
include Benchmark | |
class ReverseMarkdown | |
# set basic variables: | |
# - @li_counter: numbering list item (li) tags in an ordered list (ol) |
;; init.el | |
;; Vincent Foley - [email protected] | |
(require 'cl) | |
(defmacro when-package-installed (package-name &rest body) | |
`(if (package-installed-p ,package-name) | |
(progn ,@body) | |
(warn "package %s is not installed" ,package-name))) |