Skip to content

Instantly share code, notes, and snippets.

View joshua's full-sized avatar
🌮

Joshua Suggs joshua

🌮
View GitHub Profile
require 'rubygems'
require 'pdf/reader'
require 'rjb'
# Load Java classes
Rjb::load
PdfReader = Rjb::import('com.lowagie.text.pdf.PdfReader')
# Ruby PDF Reader Version
# Works...however(comma) RIDICULOUSLY slow
\[\033[01;37;40m\][\!] \w$(__git_ps1 " [\[\033[01;31;40m\]%s\[\033[01;37;40m\]]") %> \[\033[01;00;0m\]
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2009 The Authors
require 'formula'
class RubyOdbc < Formula
url 'http://www.ch-werner.de/rubyodbc/ruby-odbc-0.9997.tar.gz'
homepage 'http://www.ch-werner.de/rubyodbc/'
md5 '36d21519795c3edc8bc63b1ec6682b99'
depends_on 'unixodbc'
depends_on 'freetds'
#!/bin/bash
#
# trinidad JRuby Application Server
#
# chkconfig: 2345 85 15
# description: Trinidad application server
#
# source function library
. /etc/rc.d/init.d/functions
@joshua
joshua / gist:888711
Created March 26, 2011 22:54
brew install -v cmake
Warning: Xcode is not installed! Builds may fail!
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
File already downloaded and cached to /Users/josh/Library/Caches/Homebrew
/usr/bin/tar xf /Users/josh/Library/Caches/Homebrew/cmake-2.8.4.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc.
C compiler on this system is: /usr/bin/cc -O3 -w -pipe
@joshua
joshua / gist:1232941
Created September 21, 2011 18:43
Timestamp RegEx
^((([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])(,|(,\s))?)+$
@joshua
joshua / tsql_restore_filelistonly.sql
Created January 19, 2012 20:26
Helpful TSQL Scripts
USE master
GO
RESTORE FILELISTONLY
FROM DISK = N'<PATH_TO_BAK>'
GO
@joshua
joshua / README.md
Created April 3, 2013 12:56
Install RVM on Mac OS X

Install Apple Developer Tools (xcode + cli)

Install Homebrew:

http://mxcl.github.com/homebrew/

Once homebrew is installed you need install gcc42:

# brew tap homebrew/dupes
# brew install apple-gcc42
# Default PowerShell Profile
#
# ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
#
# Remote script execution must be enabled.
# Get-ExecutionPolicy should return RemoteSigned or Unrestricted
#
# If no, run the following as Administrator:
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
#