This file contains hidden or 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
| Date: Tue, 12 Jul 2011 04:51:38 -0700 (PDT) | |
| From: Cornelius special pal <youareasneakymofo-dodgy@yahoo.com.au> | |
| Subject: Re: LDH - Lost Dogs Home new operations manager (2IC) | |
| To: Mike Bailey <mike@bailey.net.au> | |
| Oh I shall keep in touch, particularly if I would like to see inaction. I mean, wow, two whole blogs in 6 months. That is quite an effort. You must be exhausted | |
This file contains hidden or 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
| Date: Sat, 9 Jul 2011 22:17:40 -0700 (PDT) | |
| From: Cornelius special pal <youareasneakymofo-dodgy@yahoo.com.au> | |
| Subject: LDH - Lost Dogs Home new operations manager (2IC) | |
| To: mike@bailey.net.au | |
| Hi Mike, | |
| You don't know me, but your research skills are unsurpassed. I thought you might like a kick start to the new appointment at LDH. this is all in the public domain. | |
| Things you should know about the new LDH "Vet" Mauricio Santos Bauer. |
This file contains hidden or 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
| [mbailey@island gs (master)]$ cap deprec:db:backup | |
| triggering load callbacks | |
| * executing `deprec:connect_canonical_tasks' | |
| triggering start callbacks for `deprec:mysql:backup' | |
| * executing `multistage:ensure' | |
| *** Defaulting to `uat' | |
| * executing `uat' | |
| * executing `deprec:mysql:backup' | |
| * executing "cd /srv/gemstalker/current && RAILS_ENV=production bundle exec rake deprec:db:backup" | |
| servers: ["uat.int.failmode.com"] |
This file contains hidden or 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
| # deprec defines some generic recipes for common services | |
| # including ruby interpreter, web, app and database servers | |
| # | |
| # They default to my current favourites which you can override | |
| # | |
| # Service options | |
| CHOICES_RUBY_VM = [:mri, :ree] | |
| CHOICES_WEBSERVER = [:apache, :none] | |
| CHOICES_APPSERVER = [:passenger, :none] | |
| CHOICES_DATABASE = [:mysql, :postgresql, :sqlite, :none] |
This file contains hidden or 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
| desc "Install Rack stack on Ubuntu server (8.04, 10.04)" | |
| task :install_stack do | |
| top.deprec.git.install | |
| top.deprec.ruby.install # Uses ruby_vm_type | |
| top.deprec.web.install # Uses web_server_type | |
| top.deprec.app.install # Uses app_server_type | |
| top.deprec.rails.install | |
| top.deprec.logrotate.install | |
| # top.deprec.monit.install # Not using monit lately | |
| end |
This file contains hidden or 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 ruby | |
| require 'rubygems' | |
| require 'highline/import' | |
| require 'mechanize' | |
| require 'uri' | |
| # Get details | |
| domain = ask("your blinksale domain prefix") + '.blinksale.com' | |
| login_page_url = "https://#{domain}/sessions/new" |
This file contains hidden or 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
| Section for VMware vCenter Converter Standalone, pid=2596, version=4.3.0, build=build-292238, option=Release | |
| [2011-02-24 14:41:11.109 03884 warning 'App'] Failed to create console writer | |
| [2011-02-24 14:41:11.249 02808 info 'App'] Current working directory: C:\Program Files\VMware\VMware vCenter Converter Standalone | |
| [2011-02-24 14:41:11.249 02808 info 'App'] Trying converter_server | |
| [2011-02-24 14:41:12.374 02808 info 'App'] [shutdownMgr,25] Ufa shutdown manager registered. | |
| [2011-02-24 14:41:12.374 02808 info 'App'] [helper,453] Initializing SSL Contexts | |
| [2011-02-24 14:41:12.406 02808 info 'Libs'] Using system libcrypto, version 9080CF | |
| [2011-02-24 14:41:13.671 02808 info 'App'] Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 120000000 | |
| [2011-02-24 14:41:13.671 02808 info 'App'] [helper,499] Initializing certificates | |
| [2011-02-24 14:41:13.671 02808 info 'App'] [task,2061] [LRO] 32 max LROs |
This file contains hidden or 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
| ## Encode | |
| json = ActiveSupport::JSON.encode(object) # extra methods like :include | |
| json = Offering.first.to_json(:include => :outlet, :methods => [:days_waiting]) | |
| ## Decode | |
| ActiveSupport::JSON.decode(json) |
This file contains hidden or 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 PostController < ApplicationController | |
| respond_to :json, :html, :jpg, :xml | |
| def index | |
| respond_with(@posts = Post.all), | |
| :methods => [:average_rating], | |
| :include => :comments | |
| end | |
| def show |
This file contains hidden or 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 ruby | |
| filename = ARGV[0] | |
| end_marker = 0 | |
| offset_increment = 1000 | |
| lines = [] | |
| fh = File.open filename | |
| while lines.size < 10 |