Skip to content

Instantly share code, notes, and snippets.

View doxavore's full-sized avatar

Doug Mayer doxavore

View GitHub Profile
GPL Ghostscript 9.14 (2014-03-26)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
-dNOPAUSE no pause after page | -q `quiet', fewer messages
-g<width>x<height> page size in pixels | -r<res> pixels/inch resolution
-sDEVICE=<devname> select device | -dBATCH exit after last file
-sOutputFile=<file> select output file: - for stdout, |command for pipe,
embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
#!/bin/bash
#
# testflightapp.com tokens
API_TOKEN="YOUR_API_TOKEN"
TEAM_TOKEN="YOUR_TEAM_TOKEN"
PRODUCT_NAME="RowMotion"
ARTEFACTS="$PWD/Artefacts"
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
################################################################################
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()
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()
@doxavore
doxavore / tmux.conf
Created November 13, 2011 15:47 — forked from bryanl/tmux.conf
I copied this from somewhere. It is a good start, though
# ~/.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:
#
@doxavore
doxavore / gist:1676687
Created January 25, 2012 15:07 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p0
# 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
@doxavore
doxavore / Vagrantfile
Created April 15, 2012 20:16
Vagrant configuration
##################################
### Custom additions from Krux
##################################
### Extensive documentation here:
### http://vagrantup.com/docs/vagrantfile.html
require 'etc'
owner = ENV['KRUX_MY_USERNAME'] || Etc.getlogin
hosts = {
@doxavore
doxavore / presenter.rb
Created April 19, 2012 16:00 — forked from ahoward/presenter.rb
worlds simplest presenter pattern. drop in replacement for ActiveRecord/Mongoid models in your controller
# 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
#
@doxavore
doxavore / gist:2661631
Created May 11, 2012 18:44 — forked from hipertracker/gist:214210
NGinx -> TorqueBox
/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;