s = Test.new(:name => "foo")
# ActiveRecord::Test after_initialize
# ActiveRecord::Test after_initialize, :on => :update
# ActiveRecord::Test after_initialize, :on => :create
# ActiveRecord::TestObserver after_initialize
# ===> #<Test id: nil, name: "foo", created_at: nil, updated_at: nil>
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
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
| name,card_type,rarity,image_url,initial_life,rules_box,type_line,mana_cost,element,earth_threshold,fire_threshold,water_threshold,wind_threshold,power,artist,set_identifier,flavor_text | |
| Unland Eel,minion,ordinary,"https://static.wixstatic.com/media/965b5c_e7cafce2a0b74891a23c78cadf248c38~mv2.png/v1/fill/w_846,h_1182,al_c,usm_0.66_1.00_0.01,enc_auto/965b5c_e7cafce2a0b74891a23c78cadf248c38~mv2.png",,"**Submerge**, **Waterbound** | |
| This Eel gains +2 power when attacking as it surfaces.",An Ordinary Beast of the deadly depths,2,water,,,1,,2,Francesca Baerald,1, | |
| Unravel,magic,ordinary,"https://static.wixstatic.com/media/965b5c_e9547880aa9e4807b5453683d002fe67~mv2.png/v1/fill/w_846,h_1182,al_c,usm_0.66_1.00_0.01,enc_auto/965b5c_e9547880aa9e4807b5453683d002fe67~mv2.png",,Destroy target Relic or Undead minion.,Ordinary Magic of rot and rebirth,1,water,,,1,,,Severine Pineaux,1,"For life to rise, the dead must crumble." | |
| Tide Naiads,minion,exceptional,"https://static.wixstatic.com/media/965b5c_796dab1d1f9b4eedb938817ee887d |
Note, at the time of writing this, I use a mac. Adjust to your preference.
If you're reading this and haven't done these things, and your laptop is still in your possession. Stop everything and do them now.
- You have an encrypted hard drive (e.g FileVault)
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
| gem "db" | |
| gem "db-postgres" | |
| gem "thread-local" | |
| require "db" | |
| require "db/postgres" | |
| require "active_record/connection_adapters/postgresql_adapter" | |
| module ActiveRecord | |
| # NOTE: This is the active record connection entry point. | |
| # This method is called internally based on the adapter specified in database.yml |
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
| # https://raganwald.com/2016/01/19/command-pattern.html | |
| class State | |
| attr_reader :history, :future | |
| attr_accessor :text | |
| def initialize(text) | |
| @history = [] | |
| @future = [] | |
| @text = text |
I hereby claim:
- I am tonywok on github.
- I am tonywok (https://keybase.io/tonywok) on keybase.
- I have a public key ASBcoIdY2d_xFoFbXJyD0jt9pJCvZj3e2lIltd14lQcLKQo
To claim this, I am signing this object:
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 "tsort" | |
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'pry' | |
| gem 'pry-byebug' | |
| 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
| require "forwardable" | |
| class Operator | |
| # TODO: probably raise if stuff isn't implemented | |
| # TODO: probable register implementations | |
| end | |
| class Operand | |
| # TODO: probably raise if stuff isn't implemented | |
| # TODO: probable register implementations |
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
| module Acronym | |
| def abbreviate(string) do | |
| string | |
| |> String.codepoints | |
| |> Enum.with_index | |
| |> Enum.reduce("", fn({letter, idx}, acronym) -> | |
| cond do | |
| String.upcase(letter) == letter and String.downcase(letter) != letter -> | |
| acronym <> letter | |
| String.at(string, idx-1) == " " -> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Ember Starter Kit</title> | |
| <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"> | |
| </head> | |
| <body> | |
| <script type="text/x-handlebars"> |
NewerOlder