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
| Hi David | |
| I'm impressed with your back ground and your responsibilities at 37signals. When researching your profile I also found that you have 4.8K followers and have been starred 29 times on GitHub. This speaks volumes to your work and your high technical expertise. I'd love the opportunity to speak with you about a Ruby Engineering role I'm currently working on for Heroku. I'd like to share more details about the position and find out if you or anyone you know would be interested. | |
| Heroku is a Platform as a Service (PaaS) that lets you deploy, run and manage applications written in Ruby, Node.js, Java, Python, Clojure and Scala. Heroku is owned by Salesforce however, we operate as a completely separate entity. This allows us to maintain our technology, culture and the formula that has made us so successful. | |
| Anyway, it would be great to set up sometime to chat. I am more than happy to answer any questions that you might have and it would be great for me to hear about what you are looking for in any potentia |
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
| def root(*args) | |
| if defined?(RAILS_ROOT) | |
| args.compact.empty? ? RAILS_ROOT : File.join(RAILS_ROOT, args) | |
| end | |
| 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
| #!/bin/sh | |
| # git-create-remote-branch <branch_name> | |
| if [ $# -ne 1 ]; then | |
| echo 1>&2 Usage: $0 branch_name | |
| exit 127 | |
| fi | |
| set branch_name = $1 | |
| git push origin origin:refs/heads/${branch_name} |
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 Poller < Rails::Metal | |
| def process(env) | |
| if env["PATH_INFO"] =~ /^\/poller_rack/ | |
| return [200, {"Content-Type" => "text/html"}, ["Hello, World!"]] | |
| end | |
| end | |
| end | |
| # Implementation: |
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
| case request.format | |
| when :html then render | |
| when :js then render | |
| else head(:not_supported) | |
| end | |
| # vs | |
| respond_to do |format| | |
| format.html |
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
| $ ruby ~/Code/rails/railties/bin/rails wonky --edge | |
| create | |
| create README | |
| create .gitignore | |
| create Rakefile | |
| create config.ru | |
| create Gemfile | |
| create app | |
| create app/controllers/application_controller.rb | |
| create app/helpers/application_helper.rb |
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
| Dec 9 14:27:03 acc-db-01 [248740.420900] divide error: 0000 [#1] SMP | |
| Dec 9 14:27:03 acc-db-01 [248740.428791] last sysfs file: /sys/devices/system/cpu/cpu15/cache/index2/shared_cpu_map | |
| Dec 9 14:27:03 acc-db-01 [248740.444194] CPU 6 | |
| Dec 9 14:27:03 acc-db-01 [248740.450660] Modules linked in: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs reiserfs xfs exportfs nfs lockd nfs_acl auth_rpcgss sunrpc ipmi_devintf ipmi_si ipmi_msghandler autofs4 bonding fbcon tileblit font bitblit softcursor vga16fb vgastate bnx2 psmouse dell_wmi serio_raw joydev power_meter dcdbas lp parport ses enclosure usbhid hid megaraid_sas | |
| Dec 9 14:27:03 acc-db-01 [248740.516499] Pid: 17864, comm: dsm_sa_snmp32d Not tainted 2.6.32-22-generic #33-Ubuntu PowerEdge R710 | |
| Dec 9 14:27:03 acc-db-01 [248740.538698] RIP: 0010:[<ffffffff8105621c>] [<ffffffff8105621c>] find_busiest_group+0x63c/0x900 | |
| Dec 9 14:27:03 acc-db-01 [248740.561223] RSP: 0018:ffff880604711b88 EFLAGS: 00010046 | |
| Dec 9 14:27:03 acc- |
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
| require File.expand_path(File.dirname(__FILE__) + '/../test_helper') | |
| class BuildStatusTest < ActiveSupport::TestCase | |
| test "remove the old statii" do | |
| assert_equal 2, BuildStatus.count | |
| BuildStatus.expire_old | |
| statii = BuildStatus.all | |
| assert_equal 1, statii.size | |
| assert statii[0].updated_at >= 30.days.ago | |
| 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
| kendall :: git/rbx » ruby scratch/bm_either.rb | |
| Rehearsal --------------------------------------------- | |
| includes? 4.410000 0.000000 4.410000 ( 4.421223) | |
| either? 6.450000 0.000000 6.450000 ( 6.478906) | |
| compare 2.040000 0.010000 2.050000 ( 2.044516) | |
| ----------------------------------- total: 12.910000sec | |
| user system total real | |
| includes? 4.470000 0.000000 4.470000 ( 4.479386) | |
| either? 6.520000 0.000000 6.520000 ( 6.542424) |
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
| Designers need fleshed out pages to do properly design a screen. | |
| In the past, we've loaded test fixtures in development to give them that. | |
| But test fixtures are not a good fit for this. | |
| They're designed to make testing easy, not designing. | |
| What we need instead is a way for a designer to create a dataset | |
| that'll work great for design and then save that as a snapshot. | |
| This snapshot can be named and reloaded as often as desired. | |
| I envision it'll work like this: |
OlderNewer