Skip to content

Instantly share code, notes, and snippets.

@jeresig
jeresig / .vimrc
Created May 4, 2011 16:46
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on
@jonraasch
jonraasch / highlight.js
Created September 2, 2010 22:14
Live on-page text highlighting
/*
highlight v3 !! Modified by Jon Raasch (http://jonraasch.com) to fix IE6 bug !!
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@balaclark
balaclark / min.rb
Created June 18, 2010 10:50
Command line script to compress & combine javascript files using the google closure compiler. "sources" needs to be a plain text file with urls of each javascript file to compress on a new line, comments are fine.
require 'rubygems'
require 'rest_client'
sources = "sources"
output = "scripts.min.js"
output_path = (File.expand_path(File.dirname(__FILE__))) + "/" + output
sources_path = (File.expand_path(File.dirname(__FILE__))) + "/" + sources
# TODO: only open file if no errors, maybe save a tmp file, then copy it over the real one?