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
Given /^I visit subdomain "(.+)"$/ do |sub| | |
#host! "#{sub}.example.com" #for webrat | |
Capybara.default_host = "#{sub}.example.com" #for Rack::Test | |
Capybara.app_host = "http://#{sub}.example.com:9887" if Capybara.current_driver == :culerity | |
################################################################################ | |
# As far as I know, you have to put all the {sub}.example.com entries that you're | |
# using in your /etc/hosts file for the Culerity tests. This didn't seem to be | |
# required for Rack::Test | |
################################################################################ |
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
require 'java' | |
require 'jodconverter-cli-2.2.1.jar' | |
def convert(file_in,file_out) | |
inputFile = java.io.File.new(file_in) | |
outputFile = java.io.File.new(file_out) | |
# connect to an OpenOffice.org instance running on port 8100 | |
connection = com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection.new(8100) | |
connection.connect() |
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
require 'java' | |
require 'jodconverter-cli-2.2.1.jar' | |
def convert(file_in,file_out) | |
inputFile = java.io.File.new(file_in) | |
outputFile = java.io.File.new(file_out) | |
# connect to an OpenOffice.org instance running on port 8100 | |
connection = com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection.new(8100) | |
connection.connect() |
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
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1676687) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
################################## | |
### Custom additions from Krux | |
################################## | |
### Extensive documentation here: | |
### http://vagrantup.com/docs/vagrantfile.html | |
require 'etc' | |
owner = ENV['KRUX_MY_USERNAME'] || Etc.getlogin | |
hosts = { |
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
# the worlds lightest weight presenter pattern. to use simply | |
# | |
# file app/presenters/post_presenter.rb | |
# | |
# PostPresenter = | |
# Presenter.for(Post) do | |
# validates_presence_of :custom_field_for_this_form | |
# | |
# end | |
# |
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
/etc/hosts: | |
127.0.0.1 myhost jboss_server | |
NGINX: | |
server { | |
listen myhost:80; | |
server_name myhost; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; |
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 | |
require 'benchmark' | |
REGEXPS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
/^Missing API definition file in (.+)$/i, | |
/^cannot load such file -- (.+)$/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
#! /usr/bin/env python | |
import fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
OlderNewer