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 bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
make install |
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 bash | |
apt-get install -y python-software-properties build-essential | |
apt-add-repository -y ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get install -y ruby1.9.3 | |
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc | |
gem install chef | |
mkdir /etc/chef | |
cat <<EOF >/etc/chef/solo.rb | |
file_cache_path "/var/chef" |
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 bash | |
apt-get install -y python-software-properties build-essential | |
apt-add-repository -y ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get install -y ruby1.9.3 | |
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc | |
gem install chef | |
mkdir /etc/chef /var/chef | |
cat <<EOF >/etc/chef/solo.rb | |
file_cache_path "/var/chef" |
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 bash | |
apt-get install -y python-software-properties build-essential | |
apt-add-repository -y ppa:brightbox/ruby-ng | |
apt-get update | |
apt-get install -y ruby1.9.3 | |
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc |
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
=> Booting Thin | |
=> Rails 3.2.5 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
>> Thin web server (v1.3.1 codename Triple Espresso) | |
>> Maximum connections set to 1024 | |
>> Listening on 0.0.0.0:3000, CTRL+C to stop | |
MONGODB (244ms) ctdev['msgs'].find({}).limit(300).sort([["_id", 1]]) | |
MONGODB (4ms) ctdev['schedules'].find({"at"=>{"$lte"=>"2012-07-13 00:26:44.081814 UTC"}}) | |
MONGODB (0ms) ctdev['configurations'].find({"_id"=>"engine"}).limit(-1) |
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
sleep 3; avconv -f x11grab -r 25 -s 1280x720 -i :0.0+0,50 -f alsa -i hw:2,0 -vcodec libx264 -preset ultrafast -acodec libmp3lame -threads 0 output.mkv |
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
<a href='javascript:(function(){$("#user_first_name").val("John");$("#user_last_name").val("Doe");$("#user_address_1").val("123 Somewhere Ln.");$("#user_city").val("Someplace");$("#user_zip").val("12345");$("#user_phone").val("1-234-567-8901");rand=randomnumber=Math.floor(Math.random()*111111);$("#user_email").val("testing"+rand+"@example.com");$("#billingAddressInput").attr("checked","true");$("input[name=agreements]").attr("checked","true");$("#user_password").val("password");$("#user_password_confirmation").val("password");})();'>DGN Reg</a> | |
<a href="javascript:(function(){$("#order_card_name").val("John Doe");$("#order_card_number").val("4904202183894535");$(".selectMonth option:eq(3)").attr('selected','selected');$(".selectYear option:eq(3)").attr('selected','selected');$(".securityCode").val('123');})();">DGN CC#</a> |
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
class Entity | |
include ActiveModel::Validations | |
attr_accessor :id | |
def self.attr_accessor(*vars) | |
@class_attributes ||= [:id] | |
@class_attributes.concat vars | |
super(*vars) | |
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
class Interactor | |
attr_reader :request, :response | |
def initialize(request = {}) | |
@request = request | |
@response = Response.new | |
end | |
private |
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
class Request < Hashie::Mash | |
def object_attributes | |
self[:object_attributes].to_hash.with_indifferent_access | |
end | |
end | |
class Response < Hashie::Mash | |
def persisted? | |
!id.nil? | |
end |
OlderNewer