Skip to content

Instantly share code, notes, and snippets.

@borgand
borgand / update_bundles
Created May 26, 2010 14:17
Zip-enabled version of update_bundles script
#!/usr/bin/env ruby
# Changelog:
# - added zip support
# - added support for cmd-line list of bundles to update
git_bundles = [
"http://github.com/astashov/vim-ruby-debugger.git",
#"http://github.com/msanders/snipmate.vim.git",
"http://github.com/scrooloose/nerdtree.git",
#!/usr/bin/env ruby
# Original: http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen
git_bundles = [
"git://github.com/vim-bundles/fuzzyfinder.git",
"git://github.com/scrooloose/nerdcommenter.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-haml.git",
@netzpirat
netzpirat / 0_README.md
Created November 12, 2010 10:42
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@nacmartin
nacmartin / Progressbar.java
Created November 17, 2010 14:10
Java text console progressbar
import java.lang.Math.*;
public class Progressbar {
private int max;
private int current;
private String name;
private long start;
private long lastUpdate;
public Progressbar(int max, String name)
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git
@peterhil
peterhil / range.js
Created May 24, 2011 01:31
A perfect range function
// JavaScript Range Function
// © 2006 Matthias Miller (originally written March 29, 2006)
// © 2010-2011 Peter Hillerström (modified 20.10.2010)
// Feel free to use it under the BSD license.
// Version: 0.1 Matthias Miller (originally written March 29, 2006)
// Version: 0.2 Peter Hillerström (modified October 20, 2010)
// Version: 0.3 Peter Hillerström (rewritten on May 24, 2011)
@alinpopa
alinpopa / gist:1281448
Created October 12, 2011 15:05 — forked from vshkurin/gist:1109136
elasticsearch analyzer example - Test Queries
# Index
---------------------------------------------------------------------
curl -XPUT http://localhost:9200/pictures/ -d '
{
"settings": {
"analysis": {
"analyzer": {
"index_analyzer": {
"tokenizer": "standard",
@aculich
aculich / forwarder.py
Created November 28, 2011 07:52
SSHForwarder class for use with the python ssh module: http://pypi.python.org/pypi/ssh
#!/usr/bin/env python
# This code is licensed according to the main package that it depends on:
# http://pypi.python.org/pypi/ssh
# License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
# http://www.gnu.org/licenses/lgpl.html
import sys, os, os.path
import select
import SocketServer
@ynkdir
ynkdir / wdiff.vim
Created January 18, 2012 14:28
wdiff.vim
" Usage:
" Copy this file to your ~/.vim/autoload directory.
" :edit oldfile
" :new newfile
" :call wdiff#highlight(2, 1) " wdiff#highlight(winnr1, winnr2)
let s:save_cpo = &cpo
set cpo&vim
function wdiff#highlight(Awinnr, Bwinnr)
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline