Skip to content

Instantly share code, notes, and snippets.

" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@robbles
robbles / collada_to_model.py
Created February 27, 2011 20:53
Converts a COLLADA scene to a custom model format, using PyCollada and Numpy
#!/usr/bin/env python -Wignore
from __future__ import print_function
import collada
from numpy import array, concatenate, empty
import sys
from os import path
import argparse
@robbles
robbles / title.pde
Created March 3, 2011 07:47
The title animation from my homepage in Processing.js
/* @pjs transparent=false; crisp=false; */
int num_elements = 80;
Element[] elements = new Element[num_elements];
PVector origin1, origin2;
color bg;
void setup()
{
size(720,100);
@robbles
robbles / title.js
Created March 10, 2011 21:21
The title animation from doteight.com, converted to Javascript.
(function() {
var mobile = false;
try {
mobile = jQuery.browser.mobile;
} catch(err) { }
var sketch = function(p) {
var num_elements = 80;
@robbles
robbles / less.vim
Created March 19, 2011 00:06
Install in ~/.vim/ftplugin/less.vim to fix indentation for LESS files.
setl nocindent
setl autoindent
setl smartindent
setl indentexpr=
@robbles
robbles / html.vim
Created April 3, 2011 01:15
Fixes an annoying bug where Vim searches through the runtime path for ages for HTML syntax files
" Fixes runtimepath issues for html files
" Language: HTML
" Author: Rob O'Dwyer
" Last Change: April 2, 2011
" Filenames: *.html, *.htm
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
echo "Warning: html syntax has been overridden!"
finish
@robbles
robbles / gist:1964023
Created March 3, 2012 03:02 — forked from anonymous/gist:1963995
StringADT.java
public class StringADT implements ADT{
private Node head;
public StringADT(){
head = null;
}
//allowed using charAt(i)
@robbles
robbles / test_case_9525220.py
Created March 5, 2012 19:45
SQLAlchemy raises None, causes TypeError - Test
Traceback (most recent call last):
File "test_case_9525220.py", line 41, in <module>
session.commit()
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 645, in commit
self.transaction.commit()
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 313, in commit
self._prepare_impl()
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _prepare_impl
self.session.flush()
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1547, in flush
@robbles
robbles / virtualenv-auto-activate.sh
Last active November 7, 2023 14:01 — forked from codysoyland/virtualenv-auto-activate.sh
virtualenv-auto-activate with support for zsh and virtualenvwrapper
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@robbles
robbles / gist:2795807
Created May 27, 2012 01:23
Rlwrap completion for node.js / JavaScript
require
global
process
console
log
error
warning
Buffer
__filename
__dirname