I hereby claim:
- I am r38y on github.
- I am r38y (https://keybase.io/r38y) on keybase.
- I have a public key whose fingerprint is 9C92 BD4F 93E3 2505 CC1E AB3F 6CDC BC3B A534 087B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class NullPhoto | |
| def file | |
| @file = OpenStruct.new( | |
| url: 'https://dossi-prod.s3.amazonaws.com/default-avatar.png' | |
| ) | |
| end | |
| # is this kosher? | |
| def blank? | |
| true |
| require 'spec_helper' | |
| describe 'creating a person' do | |
| it 'works with valid attributes' do | |
| user = create(:user) | |
| post "/api/people.json", | |
| { person: { name: 'Bob Johnson' } }, | |
| { 'Authorization' => "Token token=#{user.authentication_token}" } |
| CREATE DATABASE new_clone WITH TEMPLATE old_database; |
| -- winning_count is a random number between 0 and 1 | |
| -- times the sum of the weights | |
| SELECT id | |
| FROM ( | |
| SELECT id, SUM(weight) OVER (ORDER BY id) S | |
| FROM entries WHERE drawing_id = #{@drawing.id} | |
| ) Q | |
| WHERE S >= winning_count | |
| ORDER BY id | |
| LIMIT 1; |
| class ApplicationController < ActionController::Base | |
| around_action :set_timezone | |
| def set_timezone | |
| old_time_zone = Time.zone | |
| Time.zone = current_user.time_zone | |
| yield | |
| ensure | |
| Time.zone = old_time_zone | |
| end |
| # HEROKU_POSTGRESQL_GREEN was the old master | |
| # I promoted then got rid of the original master (because it was staging) | |
| # noticed that the follower was still a follower | |
| ➜ twinit.bauernet.me git:(split-test) heroku pg:info -r staging | |
| === HEROKU_POSTGRESQL_MAROON_URL (DATABASE_URL) | |
| Plan: Standard 2 | |
| Status: Available | |
| Data Size: 7.76 GB | |
| Tables: 16 |
| class Discussion < ActiveRecord::Base | |
| include Tokenable | |
| set_token_field_name :other_token_name | |
| end |
| <?xml version="1.0" encoding="ISO-8859-1"?> | |
| <?qbxml version="7.0"?> | |
| <QBXML> | |
| <QBXMLMsgsRq onError="continueOnError"> | |
| <BillAddRq> | |
| <BillAdd> | |
| <VendorRef> | |
| <ListID>80000438-1429823956</ListID> | |
| </VendorRef> | |
| <ItemLineAdd> |
| <?xml version="1.0" encoding="ISO-8859-1"?> | |
| <?qbxml version="7.0"?> | |
| <QBXML> | |
| <QBXMLMsgsRq onError="continueOnError"> | |
| <BillAddRq> | |
| <BillAdd> | |
| <TxnDate>2015-08-13</TxnDate> | |
| <VendorRef> | |
| <ListID>8000077D-1356714929</ListID> | |
| </VendorRef> |