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
# Lets say we need to have a list of all our states | |
# we could do it like this | |
ON = 'on' | |
OFF = 'off' | |
CLOSED = 'closed' | |
STATES = [ON, OFF, CLOSED] | |
# but adding a new state means adding it in 2 places |
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
#!/usr/bin/env ruby | |
# place in .git/hooks/prepare-commit-msg | |
branch_name = `git rev-parse --abbrev-ref HEAD` | |
commit_file = ARGV.first | |
first_line = File.open(commit_file, &:readline) | |
if first_line.strip.empty? && (match = branch_name.match(/(^.*\d+)/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
#!/bin/sh | |
set -e | |
INSTALLATION_SOURCE=instantclient_11_2 | |
ORACLE_CLIENT_VERSION=11.2.0.4.0 | |
ORACLE_INSTACLIENT_BASE=/usr/local/Oracle/product/instantclient | |
ORACLE_INSTALL_HOME=$ORACLE_INSTACLIENT_BASE/$ORACLE_CLIENT_VERSION | |
echo "Extracting..." |
OlderNewer