This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following snippet checks your about to be committed js files with jslint and asks you what do to. | |
# | |
# You'll need either CocoaDialog (you can get it with macports) or plain old curses dialog installed. | |
# Using the shell's read wouldn't cut it because you have no stdin when running git hooks. | |
# Zenity would also be an option but I haven't considered it. | |
# You can get instructions for installing Rhino here http://www.nakedjavascript.com/installing-rhino | |
# You can get a jslint Rhino ready version here: http://www.jslint.com/rhino/index.html | |
# Paths are configured for my machine, so tweak them at your own taste. | |
# Tested on Linux and Mac OS X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
For example, an expensive mousemove handler: | |
$('body').mouseover(ratelimit(function(ev) { | |
// ... | |
}, 250)); | |
*/ | |
function ratelimit(fn, ms) { | |
var last = (new Date()).getTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: HTML (version 5) | |
" Maintainer: Rodrigo Machado <[email protected]> | |
" URL: http://rm.blog.br/vim/syntax/html.vim | |
" Last Change: 2009 Aug 19 | |
" License: Public domain | |
" (but let me know if you liked it :) ) | |
" | |
" Note: This file just adds the new tags from HTML 5 | |
" and don't replace default html.vim syntax file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void(__s__=document.createElement('script'));%20void(__s__.src='http://dev.pdvel.com/browserbuttons/linklinks/index.js');void(__s__.id='__s__');void(__s__.type='text/javascript');void(document.getElementsByTagName('head')[0].appendChild(__s__)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cars": [ | |
{"make": "Honda", "model": "Accord"}, | |
{"make": "Ford", "model": "Taurus"}, | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# showing git branch | |
export __CURRENT_GIT_BRANCH= | |
export __CURRENT_GIT_VARS_INVALID=1 | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
zsh_git_invalidate_vars() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to clone an svn repository with git-svn but don't want it to push all the existing branches, here's what you should do. | |
* Clone with git-svn using the -T parameter to define your trunk path inside the svnrepo, at the same time instructing it to clone only the trunk: | |
git svn clone -T trunk http://example.com/PROJECT | |
* If instead of cloning trunk you just want to clone a certain branch, do the same thing but change the path given to -T: | |
git svn clone -T branches/somefeature http://example.com/PROJECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.294' | |
def features; %w(tiny small normal big huge) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm ERR! Error: No compatible version found: glob@'>=2.1.0- <2.2.0-' | |
npm ERR! Valid install targets: | |
npm ERR! ["1.1.0","2.0.9","2.0.8","2.0.7"] | |
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:424:10) | |
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:406:17 | |
npm ERR! at saved (/usr/local/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:136:7) | |
npm ERR! at cb (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:36:9) | |
npm ERR! Report this *entire* log at: | |
npm ERR! <http://github.com/isaacs/npm/issues> | |
npm ERR! or email it to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.outer_class').addClass('status').find('.inner_class').html('some text goes here').before('some really really REALLY long piece of text and html'); |
OlderNewer