Skip to content

Instantly share code, notes, and snippets.

View henrypoydar's full-sized avatar
🤓

Henry Poydar henrypoydar

🤓
View GitHub Profile
#RP5_HOME: "" # windoes users should set this
PROCESSING_ROOT: "/usr/share/processing" # Works for ArchLinux
#PROCESSING_ROOT: "/home/tux/processing-2.1.0" # Other linux distros with user tux
#PROCESSING_ROOT: "/Applications/Processing.app/Contents/Resources/Java" # Path for Mac?
#PROCESSING_ROOT: "C:\Java\processing-2.1.0" # if you follow PhiLhos suggestion for windoes
@henrypoydar
henrypoydar / Gemfile
Created December 11, 2012 14:41
New Relic setup for Rails app in Torquebox
...
gem "newrelic_rpm", "~> 3.5.3.25", :require => false
...
~ $ rvm use jruby-head
Using /Users/hpoydar/.rvm/gems/jruby-head
~ $ jruby -v
jruby 1.7.0.dev (ruby-2.0.0dev) (2012-03-16 61bd77a) (OpenJDK 64-Bit Server VM 1.7.0-u4-b13) [darwin-amd64-java]
~ $ jruby --1.9 -v
jruby 1.7.0.dev (ruby-2.0.0dev) (2012-03-16 61bd77a) (OpenJDK 64-Bit Server VM 1.7.0-u4-b13) [darwin-amd64-java]
~ $
@henrypoydar
henrypoydar / progress.coffee
Created January 9, 2012 16:14
Global progress
$(document).ready ->
$('#progress').ajaxStart ->
$(@).show()
$('#progress').ajaxStop ->
$(@).hide()
~ $ rvm --trace update
+__rvm_parse_args:414> [[ -z 4.3.9 ]]
+__rvm_parse_args:570> [[ -z '' && -n '' ]]
+__rvm_parse_args:572> [[ 0 -eq 1 || -n '' ]]
+__rvm_parse_args:15> [[ -n update ]]
+__rvm_parse_args:17> rvm_token=update
+__rvm_parse_args:19> [[ 0 -gt 0 ]]
+__rvm_parse_args:19> next_token=''
+__rvm_parse_args:21> case update (fetch|version|srcdir|reset|debug|reload|update|monitor|notes|implode|seppuku|question|answer|env)
+__rvm_parse_args:23> rvm_action=update
# Cookbooks and DNA stored within app codebase
# Pro: no separate repo for deploy config/setup
# Con: keeping sync'd with changes to eycloud-recipes repo harder (solve w/ subtree?)
# Structure
railsapp
|-- deploy
| |-- after_restart.rb
| |-- before_migrate.rb
require 'rubygems'
require 'mongoid'
Mongoid.configure do |config|
config.master = Mongo::Connection.new.db("mongoid_key_test")
end
Mongoid.master.collection("users").drop
class User
# Bundler doesn't seem to work with gems that have native extensions
# in 1.9.x unless they were installed beforehand. A problem when
# thinking about cloud deployments with fresh instances.
myapp$ rvm use system
=> Now using system ruby
myapp$ bundle install # Gems with native extensions are already installed for this ruby version
=> ... Your bundle is complete!
myapp$ rake
=> ... green
We couldn’t find that file to show.
# Rack middleware for serving individual javascript files
# from non-public directories to the Jammit asset packager
# when in test or development modes
#
# To use, add this line to the relevant (development)
# environment file:
#
# config.middleware.use 'JavascriptsHost'
#