Skip to content

Instantly share code, notes, and snippets.

View eladg's full-sized avatar
👷‍♂️
Looking for work

Elad Gariany eladg

👷‍♂️
Looking for work
View GitHub Profile
This is a short text with couple of words
@eladg
eladg / pre-commit
Last active August 29, 2015 14:23 — forked from Simbul/pre-commit
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production", "sandbox"]
@eladg
eladg / heroku_sync_dotenv
Last active August 29, 2015 14:14
sync .env to heroku config
#!/bin/bash
for line in `cat .env` ;
do
IFS='='
read -a array <<< "$line"
if [[ ${array[0]} != "#"* ]] ;
then
echo "heroku config:set ${array[0]}=${array[1]}"
fi
done