Skip to content

Instantly share code, notes, and snippets.

View ehowe's full-sized avatar

Eugene Howe ehowe

  • Theorem
  • St. Johns, MI
View GitHub Profile
@ehowe
ehowe / gist:3083162
Created July 10, 2012 13:14
automigrate
#!/bin/bash
clear
unalias ls 2> /dev/null
#
# The next section is only functions that are called in other parts of the script
#
/share/eugene/.rvm/gems/ruby-1.9.3-p125/gems/excon-0.13.3/lib/excon/connection.rb:262:in `request_kernel': Expected(200) <=> Actual(202 Accepted) (Excon::Errors::Accepted)
request => {:connect_timeout=>60, :headers=>{"Content-Type"=>"application/vnd.tmrk.ecloud.internetService+xml", "Cookie"=>"vcloud-token=82e99594-aa5b-412a-9337-00afd58c793a; path=/", "Host"=>"services.enterprisecloud.terremark.com:443", "Content-Length"=>294}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/share/eugene/.rvm/gems/ruby-1.9.3-p125/gems/excon-0.13.3/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"services.enterprisecloud.terremark.com", :path=>"/api/v0.8b-ext2.8/extensions/publicIp/187033/internetServices", :port=>"443", :query=>nil, :scheme=>"https", :body=>"
<CreateInternetServiceRequest xmlns=\"urn:tmrk:eCloudExtensions-2.6\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">
<Name>test service</Name>
<Protocol>TCP</Protocol>
<Port>7000</Port>
@ehowe
ehowe / gist:1934211
Created February 28, 2012 18:39
Camaro Response
It's an 83, engine is a 305 (carburetor, not TBI) with about 4k miles since i
replaced it, if that. Transmission (5-speed) was rebuilt about 2000 miles
ago.
It is a T-top, which are kinda leaky to be honest. New seals are available,
just never had the time to replace them.
The good:
It runs like a beast, I would trust this car mechanically without a problem.
I've done all the work on it myself. It's also very, very loud by design. The
Eugene Howe 9:52 AM
woah woah woah
9:52 AM
do i look like james' pimp?
Tim Littlemore 9:52 AM
yes
John Yerhot 9:52 AM
yes
Stan Hiller 9:52 AM
yup
if (RTEST(rf_call(path,is_file,Qnil))) {
body = rf_call(path, id_read_file,Qnil);
/* I don't wanna deal with non-strings :D. */
if (TYPE(body) != T_STRING) {
return -ENOENT;
}
/* We have the body, now save it the entire contents to our
* opened_file lists. */
require 'readline'
input = Readline.readline("\[\e[32;01m\]Prompt is green and bold >\[\e[0m\]")
puts input
#Output will be []Prompt is green >[]
#Prompt will actually be green and bold, so the colors are working, just not the escaping.
module ArshCommands
def self.rvm(command)
command = command.join(' ')
output = %x{bash -c "source #{ENV['HOME']}/.rvm/scripts/rvm; rvm #{command}; env | grep -i rvm"}
output.split("\n").select { |l| l[/=/] }.each do |n|
var, value = n.split(/=/,2)
ENV[var.upcase] = value
end
case command
when /^use /
@ehowe
ehowe / ffmpeg.sh
Created August 11, 2011 22:16
ffmpeg ey
#!/bin/bash
media_libs="/engineyard/portage/media-libs"
media_sound="/engineyard/portage/media-sound"
media_video="/engineyard/portage/media-video"
dev_lang="/engineyard/portage/dev-lang"
dev_python="/engineyard/portage/dev-python"
if [ $(uname -m) == 'x86_64' ]; then
mask="~amd64"