Skip to content

Instantly share code, notes, and snippets.

#!/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
@WaYdotNET
WaYdotNET / Vagrantfile
Last active August 29, 2015 14:08 — forked from gasman/Vagrantfile
# -*- 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
<html>
<head>
<title>My first Three.js app</title>
<style>canvas { width: 100%; height: 100% }</style>
</head>
<body>
<script src="three.min.js"></script>
<script>
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, window.innerWidth/window.innerHeight, 0.1, 1000);
// 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;
}
@WaYdotNET
WaYdotNET / index.md
Created February 28, 2013 22:42 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

<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 */
@WaYdotNET
WaYdotNET / foo.cs
Created April 17, 2012 22:40
Ruby vs C#
using FluentNHibernate.Mapping;
public class WebReference
{
public virtual int Id { get; private set; }
public virtual string Title { get; set; }
public virtual string SubTitle { get; set; }
public virtual string ImageSmall { get; set; }
public virtual string ImageBig { get; set; }
public virtual string DescriptionSmall { get; set; }
public virtual string DescriptionBig { get; set; }
@WaYdotNET
WaYdotNET / class.cs
Created April 17, 2012 10:59
Nustache
var listaFatture = new List<Fatture>();
listaFatture.Add(new Fatture(15, "Fattura fittizzia", DateTime.Now));
listaFatture.Add(new Fatture(0, "Fattura FOOOO", DateTime.Now));
listaFatture.Add(new Fatture(35000, "BAAARRRRR", DateTime.Now));
var obb = new obbligatori();
obb.Descrizione = "descrizione sommaria";
obb.Nome = "che bel nome : fooo {{foo}}";
obb.Fattures = listaFatture;