Skip to content

Instantly share code, notes, and snippets.

View orlin's full-sized avatar

Orlin M Bozhinov orlin

  • Astrolet
  • Varna, Bulgaria
  • X @orlin
View GitHub Profile
@topfunky
topfunky / new-github.sh
Created July 25, 2011 22:23
Shell shortcut to setup a Git repo with GitHub. Works with zsh or bash.
# Usage: new-github topfunky tidy_table
function new-github() {
git remote add origin git@github.com:$1/$2.git
git push origin master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git config push.default current
}
How to add cmd-left-arrow and cmd-right-arrow (without shift) key bindings to the mac os x Terminal
app if the Lion install removed this bindings from your system.
1) Open "System Preferences".
2) Go to "Keyboard".
3) Select the "Keyboard Shortcuts" tab.
4) Select "Application Shortcuts" from the list of items in the left.
5) Press "+" to add a new shurtcut.
6) As "Application" select "Terminal", as "Menu Title" use: "Select Next Tab". For the "Keyboard Shortcut" field just select the field and press cmd-right-arrow.
7) Repeat again from step 5, using "Select Previous Tab" as Menu Title and pressing cmd-left-arrow as keyboard shortcut.
@ded
ded / cmd
Created September 21, 2011 03:45
ender | backbone
ender build backbone
ab -t 10 -c 100 http://127.0.0.1:8000/bytes/12 against benchmark/http_simple.js OSX x64 build
v0.1.13 4792.77 req/sec
v0.2.6 4977.69
v0.4.12 5878.03
v0.5.9-pre 5912.16
Hi David,
I came across your profile online and wanted to reach out about Development
Opportunities here at Groupon. The company is growing, and we're always
looking for folks with solid skills that can make positive contribution to
our continued success. Any chance you'd be open to a quick conversation
about opportunities, or for any possible networking potential? If so, let me
know when you're free and we can set up a time to chat. Also, if you are
interested, it would be great if you could forward a current resume over
that I can take a look at. I look forward to hearing back from you! Please
let me know if you have any questions.
@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;
@madrobby
madrobby / i18n.coffee
Created November 14, 2011 15:45
Backbone i18n with CoffeeScript
# before this file is loaded, a locale should be set:
#
# In a browser environment, you can use:
# ```<script>__locale='en';</script>```
#
# In a server environment (specifically node.js):
# ```global.__locale = 'en';```
# normalize in-app locale string to "en" or "de-AT"
parts = @__locale.split('-')
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@geddski
geddski / nesting.js
Created January 14, 2012 05:08
helper function for nesting backbone collections.
function nestCollection(model, attributeName, nestedCollection) {
//setup nested references
for (var i = 0; i < nestedCollection.length; i++) {
model.attributes[attributeName][i] = nestedCollection.at(i).attributes;
}
//create empty arrays if none
nestedCollection.bind('add', function (initiative) {
if (!model.get(attributeName)) {
model.attributes[attributeName] = [];
@mislav
mislav / readme.md
Created January 25, 2012 14:42
CLI tool that checks the build status of current branch on Travis CI

Check build status of a project on the command line

Install (copy & paste):

curl -sL raw.github.com/gist/1676577/travis.rb > ~/bin/travis \
  && chmod +x ~/bin/travis

gem install hub | tail -2
ruby -e 'require "json"' 2&gt;/dev/null || gem install json