This file contains hidden or 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
Show hidden characters
[ | |
// jump between block | |
{"keys": ["alt+k"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false}}, | |
{"keys": ["alt+j"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true}}, | |
{"keys": ["shift+alt+k"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}}, | |
{"keys": ["shift+alt+j"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}}, | |
// Origami | |
{ "keys": ["super+k", "super+w"], "command": "destroy_pane", "args": {"direction": "self"} }, |
This file contains hidden or 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
# Remap prefix Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling |
This file contains hidden or 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
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git | |
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-nodejs.git |
This file contains hidden or 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 'yaml' | |
ymls = Dir['config/locales/**/*.yml'].sort.each_slice(2).to_a | |
def get_keys(object) | |
if object.is_a? Hash | |
(object.keys + get_keys(object.values)).flatten.uniq | |
elsif object.is_a? Array | |
object.collect{ |value| get_keys value } | |
else |
This file contains hidden or 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 | |
MAIN_BRANCH=${1-master} | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git branch --merged | grep -v "\*" | grep -v $MAIN_BRANCH | grep -v dev | xargs -n 1 git branch -d |
This file contains hidden or 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 | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git add . | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git commit --amend $1 | |
This file contains hidden or 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
class Graph | |
Vertex = Struct.new(:name, :neighbours, :distance, :previous) | |
def initialize(graph) | |
@vertices = Hash.new do |key, value| | |
key[value] = Vertex.new(value, [], Float::INFINITY) | |
end | |
@edges = {} |
This file contains hidden or 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
function parseExpression(program) { | |
program = skipSpace(program); | |
var match, expr; | |
if (match = /^"([^"]*)"/.exec(program)) | |
expr = {type: "value", value: match[1]}; | |
else if (match = /^\d+\b/.exec(program)) | |
expr = {type: "value", value: Number(match[0])}; | |
else if (match = /^[^\s(),"]+/.exec(program)) | |
expr = {type: "word", name: match[0]}; | |
else |
This file contains hidden or 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
# create file adb-hosts | |
192.168.0.133 adm.dev | |
192.168.0.133 api.clickjogos.dev | |
192.168.0.133 clickjogos.dev | |
192.168.0.133 connect.clickjogos.dev | |
192.168.0.133 devcenter.dev | |
192.168.0.133 jdm.dev | |
192.168.0.133 m.clickjogos.dev | |
192.168.0.133 sso_example.clickjogos.dev |
This file contains hidden or 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
// md5 | |
package br.com.clickjogos.utils; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class Md5 { | |
public Md5() {} | |
public String generate(final String s) { |