Skip to content

Instantly share code, notes, and snippets.

View marcelmorgan's full-sized avatar
💭
Running

Marcel Morgan marcelmorgan

💭
Running
View GitHub Profile
@marcelmorgan
marcelmorgan / oracle-osx-installer.sh
Created December 5, 2014 20:12
Oracle Mac OS X Installer (sqlplus + SDK)
#!/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..."
@marcelmorgan
marcelmorgan / player_connection.rb
Created April 22, 2015 11:57
Handling WebSocket connections with Rack
require 'pusher'
class PlayerConnection
attr_reader :player, :username, :web_socket, :broadcast_id
def initialize(player:, web_socket:)
@player = player
@web_socket = web_socket
end
#!/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))