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 | |
| # Put this in your ~/.git/hooks folder to auto add branch name to git commit messages. | |
| # | |
| BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2> /dev/null | grep -oE "[A-Z]+-[0-9]+") | |
| if [ -n "$BRANCH_NAME" ]; then | |
| if ! grep -q "$BRANCH_NAME" $1 ; then | |
| echo -en "[$BRANCH_NAME] " | cat - "$1" > /tmp/out && mv /tmp/out "$1" | |
| fi | |
| fi |
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
| #!/usr/bin/ruby | |
| require 'fileutils' | |
| NO_MOVE_LIST=%w{.directory} | |
| def cleanit(s) | |
| s =s.split('/')[-1] | |
| sub =s.split(/(s[0-9])|([0-9]+of)|([0-9]+x[0-9]+)|(201[0-9])|([0-9]{3})/i) | |
| show_name = sub[0] | |
| if show_name.size > 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
| ## This gist is intended to provide a code example for the | |
| # 'Making Signed Requests' section of the 'Authentication Overview' document. | |
| # (http://developer.netflix.com/docs/Security). | |
| # | |
| # We are going to make a catalog request. The hardest part of | |
| # it is figuring out how to generate the oauth_signature. | |
| require 'cgi' | |
| require 'base64' | |
| require 'openssl' |