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
#!/bin/sh | |
# An example hook script to verify what is about to be pushed. Called by "git | |
# push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done | |
# $2 -- URL to which the push is being done |
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
# from http://quanterium.blogspot.com/2012/01/creating-self-signed-ssl-certificate.html | |
# see also http://www.mail-archive.com/[email protected]/msg47647.html | |
# to use: | |
# first, change alt_names | |
# then, openssl req -new -x509 -days 365 -nodes -out example.crt -keyout example.key -config example.conf | |
# and follow instructions | |
[ ca ] | |
default_ca = CA_default |
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
" reload .vimrc when editing it: :so % | |
set nocompatible " be iMproved | |
filetype off " required! | |
set nu " show line numbers | |
set hlsearch " highlight search terms | |
" Clear last search highlighting | |
nnoremap <c-m> :noh<cr> | |
" Easier navigation between split windows |
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
VAGRANT_LOG=debug vagrant ssh | |
INFO global: Vagrant version: 1.3.5 | |
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/box/plugin.rb | |
INFO manager: Registered plugin: box command | |
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/destroy/plugin.rb | |
INFO manager: Registered plugin: destroy command | |
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/halt/plugin.rb | |
INFO manager: Registered plugin: halt command | |
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/help/plugin.rb | |
INFO manager: Registered plugin: help command |
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
Ext.grid.GridPanel.prototype.getFeatures = function() { | |
return this.view.featuresMC; | |
}; | |
Ext.grid.GridPanel.prototype.getFilters = function() { | |
var features = this.getFeatures(); | |
if (features && features.items) { | |
for (var i = 0; i < features.items.length; i++) { | |
if (features.items[i].ftype === 'filters') { | |
return features.items[i]; |
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
var constructor_getter = (function() { | |
var parser = function(ns, instance) { | |
for (var key in ns) { | |
try { | |
if (instance instanceof ns[key]) { | |
return key; | |
} | |
} catch (err) {} | |
} | |
}; |
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 ./before_src/sinon-1.4.2 | |
#= require application | |
#= require backbone_base | |
#= require buckets_dashboard | |
#= require racking | |
#= require service_order | |
#= require dashboard | |
#= require matters | |
#= require_tree ./ |
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
load_script = function (url, callback) { | |
var oDOC = document; | |
var head = oDOC.head || oDOC.getElementsByTagName("head"); | |
// loading code borrowed directly from LABjs itself | |
setTimeout(function () { | |
if ("item" in head) { // check if ref is still a live node list | |
if (!head[0]) { // append_to node not yet ready | |
setTimeout(arguments.callee, 25); | |
return; |
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
tmux | |
move window | |
:move-window -t INDEX | |
swap window | |
:swap-window -t INDEX | |
kill session | |
tmux kill-session -t mynames | |
cycle sessions | |
C-a ( | |
save scrollback text into a 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
var deepDetect = function(list, iterator, context) { | |
var _deepDetect = function(list, iterator, context) { | |
if (_.isArray(list[0])) { | |
_.each(list, function(sublist) { | |
return _deepDetect(sublist, iterator, context); | |
}); | |
} | |
else { | |
var res = _.detect(list, iterator, context); | |
if (!_.isUndefined(res)) { |