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
| <div class="span-20"> | |
| <div class="span-15">Left stuff in left column</div> | |
| <div class="span-5 last">Right stuff in left column</div> | |
| </div> | |
| <div class="span-4 last"> | |
| Right bar stuff | |
| </div> |
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 Twitter | |
| def self.find(twitter_username) | |
| # makes an API call to twitter to find the kinsey object! | |
| # returns a TwitterUser object | |
| # TwitterUser.new | |
| end | |
| end | |
| class TwitterUser | |
| def recent_tweets |
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 Dog | |
| @@all_dogs = [] | |
| def initialize(name) | |
| @@all_dogs << self | |
| @name = name | |
| end | |
| def self.bark | |
| @@all_dogs.each {|dog| dog.bark } |
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 Drivable | |
| extend ActiveSupport::Concern | |
| class TemplateError < RuntimeError; end | |
| included | |
| validates :direction, :presence => true | |
| validates :speed, :presence => true | |
| end | |
| def turn(new_direction) |
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 PaymentProcessor | |
| def initlialize(stripe = Stripe.new(api_key: 'whatever')) | |
| self.stripe = stripe | |
| end | |
| def void_transaction(transaction) | |
| stripe.void_transaction(transaction) | |
| end | |
| def process(*payment_attributes) |
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 'package) | |
| (add-to-list 'package-archives | |
| '("marmalade" . "http://marmalade-repo.org/packages/") t) | |
| (package-initialize) | |
| (when (not package-archive-contents) | |
| (package-refresh-contents)) | |
| ;; Add in your own as you wish: | |
| (defvar my-packages '(starter-kit |
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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v1.4.11 (GNU/Linux) | |
| mQENBFIZB58BCAC74FR/OZZrhCbCibJj/1UmHSV3veZzKyokMdPU1Gs1k9X+CBth | |
| IWqqFb6kXaiAz1MBjIea2i7EizVujG1lCD2GYasONpBEli2Ur4Y8rT5fhAavVXf/ | |
| zCohHEpnXYAneT45EGgt0oG5L7HTxMBbYy61MrpF0YfLXAyzVrnU+2OPa2WVsDQZ | |
| EX2PtuuS6gDIeVNTwkCiS5ClbCSgERJp+CKnpMar90DM0BdhTjiJ0VxxTFPQyhga | |
| gZ6B8GlH1ijUtMjRIhrleybTpTMB+gmbf6CtNS3Dn4FOWDGP+FcGohvys+Jb/zGf | |
| q9FXz3jjuJovrmUcdv3FTE95kQnen2uswOszABEBAAG0IUplZmYgVGFnZ2FydCA8 | |
| amVmZkBqZXRhZ2dhcnQuY29tPokBOAQTAQIAIgUCUhkHnwIbAwYLCQgHAwIGFQgC |
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
| SELECT "user_id2_2" as "result1_4", | |
| "id0_1" as "result2_4", | |
| "email1_1" as "result3_4", | |
| "name1_3" as "result4_4" | |
| FROM (SELECT * | |
| FROM (SELECT "id" as "id0_1", | |
| "email" as "email1_1" | |
| FROM "user" as "T1") as "T1", | |
| (SELECT "id" as "id0_2", | |
| "organization_id" as "organization_id1_2", |
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
| void main() { | |
| generator().listen((i) => print(i)); | |
| } | |
| Stream<int> generator() async* { | |
| yield 1; | |
| yield 2; | |
| yield 3; | |
| } |
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
| void main() { | |
| wrappingGenerator().listen((i) => print(i)); | |
| } | |
| Stream<int> wrappingGenerator() async* { | |
| nestedGenerator().listen((i) async* { yield i; }); | |
| } | |
| Stream<int> nestedGenerator() async* { | |
| yield 1; |
OlderNewer