Skip to content

Instantly share code, notes, and snippets.

@apples001
apples001 / oracle_prepared.rb
Created January 18, 2011 03:47 — forked from enebo/oracle_prepared.rb
Fixed a few code errors to ensure this runs
require 'java'
require 'C:/jdev/jdcbdrivers/11.2/ojdbc6.jar'
require 'lib/jdbc_connection'
require 'lib/dbms_output'
# v--- java_import is better than import if you end up using rake for testing
# v--- java,org,edu,javax can all be supplied bare-word instead of string form
java_import java.sql.CallableStatement
java_import java.sql.Connection
@michaelfeathers
michaelfeathers / methodshark.rb
Created March 9, 2011 15:58
Output the complexity trend of an individual method across its history
#!/usr/bin/env ruby
# Print the complexity over time for a Ruby method in a
# git repository.
#
# Requires: >= bash ?.?
# >= git 1.7.1
# >= ruby 1.9.2
# >= flog 2.5.0
#
@twerth
twerth / colors
Created July 22, 2011 15:47
List colors in shell
#!/bin/bash
echo -e "\033[0mCOLOR_NC (No color)"
echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK"
echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE"
echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN"
echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN"
echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED"
echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE"
echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW"
#!/bin/bash
mongod -vvvv --profile=2 --logpath /usr/local/var/log/mongodb/mongod.log -f /usr/local/etc/mongod.conf --fork
echo 'mongodb started'