Skip to content

Instantly share code, notes, and snippets.

View BRIMIL01's full-sized avatar

Brian Miller BRIMIL01

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brimil01 on github.
  • I am brimil01 (https://keybase.io/brimil01) on keybase.
  • I have a public key ASDy-ZKaMeWBIOELmg4KKgcNIpd9EXXFZkFmoHm49FkjKwo

To claim this, I am signing this object:

~/dev/rliapi_json/pkg(master ✔) gem inabox rliapi_json-0.0.7.gem
Enter the root url for your personal geminabox instance. (E.g. http://gems/)
Host: http://gems.wh.reachlocal.com:9292/
Pushing rliapi_json-0.0.7.gem to http://gems.wh.reachlocal.com:9292/...
ERROR: Error (500 received)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
require 'fog/aws'
require 'fog/compute'
module Fog
module Compute
class AWS < Fog::Service
extend Fog::AWS::CredentialFetcher::ServiceMethods
requires :aws_access_key_id, :aws_secret_access_key
recognizes :endpoint, :region, :version, :host, :path, :port, :scheme, :persistent, :aws_session_token, :use_iam_profile, :aws_credentials_expire_at
@BRIMIL01
BRIMIL01 / gist:1039530
Created June 22, 2011 04:56
Show the ast and bytecode for a ruby expression in rubinius
bin/rbx compile -A -B -e "1 + 1"
@BRIMIL01
BRIMIL01 / gist:969095
Created May 12, 2011 18:03
RFC 2822 regex?
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
def test_twitter_send
update_text = "Test Twitter Text"
Twitter.expects(:configure)
u = Factory(:user)
a = Factory(:authorization, :user => u)
log_in(u, a.uid)
fill_in "text", :with => update_text
check("tweeted")
click_button "Share"
[1] % rvm --trace use ruby-1.9.2 ~
+/Users/bmiller/.rvm/scripts/initialize:77> [[ -z 4.3.9 ]]
+/Users/bmiller/.rvm/scripts/initialize:91> export rvm_action rvm_alias_expanded rvm_archflags rvm_archive_extension rvm_archives_path rvm_bin_flag rvm_bin_path rvm_clang_flag rvm_config_path rvm_configure_flags rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_path rvm_docs_type rvm_dump_environment_flag rvm_environments_path rvm_error_message rvm_examples_path rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_gemset_separator rvm_gemsets_path rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_help_path rvm_hook rvm_install_arguments rvm_install_on_use_flag rvm_lib_path rvm_llvm_flag rvm_loaded_flag rvm_log_path rvm_make_flags rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_patches_path rvm_path rvm_pretty_print_f
@BRIMIL01
BRIMIL01 / heroku_backup.rb
Created March 14, 2011 15:19
Heroku backup configuration for postgres
ENV['DATABASE_URL'] =~ /^postgres\:\/\/([^:]+)\:([^@]+)@([^\/]+)\/(.+)$/
db_config = {
"database" => $4,
"username" => $1,
"password" => $2,
"host" => $3
}
database PostgreSQL do |db|
db.name = db_config["database"]
db.username = db_config["username"]
@BRIMIL01
BRIMIL01 / gist:853895
Created March 4, 2011 00:19
blingbling
class String
def bling
self + "inator"
end
def bling!
replace(self.bling)
end
end
@BRIMIL01
BRIMIL01 / gist:841225
Created February 23, 2011 21:31
gource rake task for pathways
namespace :gource do
desc "Build gource file"
task :build => :environment do
system("gource -s .05 -800x600 --disable-progress --stop-at-end --bloom-multiplier .4 --bloom-intensity 1.5 --hide-filenames --output-framerate 30 --user-image-dir #{Rails.root}/.git/avatar --output-ppm-stream #{Rails.root}/gource/pathways.ppm #{Rails.root}")
system("ffmpeg -y -b 3000k -r 30 -f image2pipe -vcodec ppm -i #{Rails.root}/gource/pathways.ppm -vcodec libx264 -vpre hq -vpre fastfirstpass #{Rails.root}/gource/pathways.mp4")
system("rm #{Rails.root}/gource/pathways.ppm")
end
end