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
# This sort-of works. It got unnecessarily complicated though. Suggestions welcome. | |
# Renders an ItemContainer as a <ul> element and its containing items as <li> elements. | |
# Prepared to use inside the topbar of Twitter Bootstrap http://twitter.github.com/bootstrap/#navigation | |
# | |
# Register the renderer and use following code in your view: | |
# render_navigation(level: 1..2, renderer: :bootstrap_topbar_list, expand_all: true) | |
class BootstrapTopbarList < SimpleNavigation::Renderer::Base | |
def render(item_container) |
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
# Installing on arch needs this patch and ENV | |
curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | RUBY_CONFIGURE_OPTS=--with-readline-dir="/usr/lib/libreadline.so" rbenv install --patch ./github-2.1.1 |
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
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' |
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 | |
branch=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *') | |
trimmed=$(echo $branch | sed -e 's/^[^-]*\/\(.*\)/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' ) | |
echo -n "[$trimmed]"' '|cat - "$1" > /tmp/out && mv /tmp/out "$1" |
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
```...```........,,,,,,..,...,............```````.`.````````````` `````````.``````````````...`..`````.`````.`````.`````````````````` `..,;,,,::,:``..::'#;+,+'';'.,::;;:,,::::,;+:::;''+';:;;;;'+'';;;;;;;##+,, | |
`````.``````.````````````.``````...,..,.,......,.,.,.,.,.,....................,...,.........................`````.````````````.` `.,:;````::;''+'''+''';;;;::';;:::,:::;;:::::;;:::::,:,:::,:,:;##:, | |
.,,,,,::,,,,,,,,,.......`.``````...,,.,.,......,.,.,.,.,.,..............,.,.,.,.,.,.,.,......```````````.`````.````````````` ``.```` ` `..`,:;''''''''''''';;;';;;;;;;;;;;;;:::;:;::::,;::::,:,:,##+, | |
```````..`````.``````.`````.`````..,;'''''';;';;;;:;:;::,:,,.,,.,..`....,.,.,.:.,.,.,.,......`````.`````.`````.`````````` `...` `.` ` ````;::''''+'''';';';;;;;;;:;;;:;:;:::;:;:;::,::;:::::::;;'##; | |
,,,.......````.``````.````````````......,............,,...,,,....,,,,,,,::::::::::;;;;;;:;::..````.`````.....`....``..`. ``.,.` .` ` `` ,;'+++++#+++++#++++++'';;;:::::;:,,,, |
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/bash | |
containers=$( (docker ps ; docker ps -a ) | tr -s ' ' | sort | uniq -u |grep -v '_data'|grep -v "CONTAINER" | awk '{print $1}' ) | |
if [[ -n $containers ]]; then | |
docker rm $containers | |
fi | |
images=$(docker images |grep '<none>'| awk '{print $3}') | |
if [[ -n $images ]]; then | |
docker rmi $images | |
fi |
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
# config/bundler-mem.rb | |
require 'action_view' | |
module Bundler | |
class Runtime | |
include ActionView::Helpers::NumberHelper | |
REQUIRE_ERRORS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/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
source 'https://rubygems.org' | |
source "https://code.stripe.com" | |
# Distribute your app as a gem | |
# gemspec | |
gem 'redis-rack' | |
gem 'puma' | |
# Optional JSON codec (faster performance) | |
gem 'oj' |
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
"%B4000000000000002^CardUser/John^030510100000019301000000877000000?;4000000000000002=0305101193010877?".split('').forEach(function(k){ | |
var e = new KeyboardEvent("keydown", {key: k, char: k, charCode: k.charCodeAt(0), keyCode: k.charCodeAt(0), which: k.charCodeAt(0)}); | |
window.dispatchEvent(e); | |
}); | |
var ev = document.createEvent('KeyboardEvent');; ev.initKeyEvent( | |
'keydown', true, true, window, false, false, false, false, 13, 0); | |
document.body.dispatchEvent(ev); |
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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"github.com/fatih/color" | |
"github.com/nsf/termbox-go" | |
"os" | |
"strings" |
OlderNewer