Skip to content

Instantly share code, notes, and snippets.

View tanema's full-sized avatar
🐦

Tim Anema tanema

🐦
View GitHub Profile
@tanema
tanema / vimrc
Created August 21, 2012 14:11
my vimrc file
set nocompatible " use vim defaults
set mouse=a " use mouse because I am a noob
set ls=2 " allways show status line
set tabstop=2 " numbers of spaces of tab character
set shiftwidth=2 " numbers of spaces to (auto)indent
set scrolloff=3 " keep 3 lines when scrolling
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " do incremental searching
set ruler " show the cursor position all the time
@tanema
tanema / gist:3415843
Created August 21, 2012 14:10
my windows prompt
make a env variable called prompt and enter this
tim@$T$S$P$_$$$S
@tanema
tanema / cookielistener.js
Created August 21, 2012 14:08
cookie listener for changes
function cookieListener(cookieName, callback) {
this.cookiename = cookieName;
this.callback = callback;
this.cookieRegistry = [];
this.interval = setInterval(this.observe, 100);
}
cookieListener.prototype.CREATED = 'created';
cookieListener.prototype.DELETED = 'deleted';
cookieListener.prototype.UPDATED = 'updated';
cookieListener.prototype.observe = function() {
@tanema
tanema / filefield.js
Created August 9, 2012 02:37
This a a file field for ember.js that when asked for the value it will return the filehandler with the file within, this file handler also has the ability to upload to a url
ABApp.FileField = Ember.View.extend({
classNames: ['ember-file-field'],
tagName: "input",
attributeBindings: ['type', 'value'],
value: "",
file: null,
type: "file",
fileSize: 1024000,
fileTypes: ["image/png", "image/gif", "image/jpg", "image/tif", "image/gif"],
init: function(){