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 | |
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 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 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) | |
COMMIT_MESSAGE=$1 | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git status | |
echo -e "\n$(tput setaf 2)\n** Executing add command$(tput sgr0)" | |
git add . |
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
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 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
{ | |
"auto_complete": true, | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", |
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 object = undefined | |
, minimum = undefined | |
, count = 0 | |
, limit = 0 | |
, skip = 5 | |
, interval = undefined; | |
function expand(width) { | |
object = document.getElementById('super'); | |
minimum = object.offsetWidth; |
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
// example 1: format "Days" : days, "Hours" : hours, "Minutes" : minutes, "Seconds" : seconds | |
millisToTime = function(ms) { | |
x = ms / 1000; | |
seconds = Math.round(x % 60); | |
x /= 60; | |
minutes = Math.round(x % 60); | |
x /= 60; | |
hours = Math.round(x % 24); | |
x /= 24; | |
days = Math.round(x); |
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
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyhd YOUR_HARD_DISK.vdi –resize SIZE_IN_MB |
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 jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); |
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
split = (array, numberOf) -> | |
matrix = [] | |
indice = 0 | |
aux = -1 | |
while indice < array.length | |
if indice % numberOf is 0 | |
aux++ | |
matrix[aux] = [] | |
matrix[aux].push array[indice] |