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> | |
| <title></title> | |
| <style> | |
| body { | |
| background: white; | |
| text-align: center; | |
| padding: 20px; | |
| font-family: Georgia, serif; |
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
| 000 SUB RECEIVE_REFUND | |
| 010 ASK POLITELY | |
| 020 IF REFUND = "YES" THEN | |
| 030 GOTO GOODBYE | |
| 040 ELSE | |
| 050 GOTO ASK_STERNLY | |
| 060 END IF | |
| 070 ASK_STERNLY: | |
| 080 ASK STERNLY | |
| 090 IF REFUND = "YES" THEN |
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
| then refactor |
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
| Foo = function(bar) { | |
| this.bar = bar; | |
| } | |
| foo = new Foo('baz'); | |
| foo.bar = 'qux'; | |
| // This works. |
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 a (atom 0)) | |
| (doseq [x [:a :b :c :d] | |
| :while (not (nil? x))] | |
| (swap! a inc)) | |
| a |
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
| idea = new Idea() | |
| //=> child | |
| idea.fetch() | |
| //=> TypeError: Cannot call method 'ajax' of undefined |
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
| startOfMonth: (date) -> | |
| startOfMonth = date.beginningOfMonth() | |
| console.log startOfMonth.format('{MM}-{DD}-{YYYY}') | |
| endOfMonth: (date) -> | |
| endOfMonth = date.endOfMonth() | |
| console.log endOfMonth.format('{MM}-{DD}-{YYYY}') | |
| # Maybe this? |
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 File | |
| instance_eval do | |
| :open.is_inverse_of(:close) | |
| end | |
| end | |
| File.under(:open, *open_args) do |file| | |
| # do stuff to the file | |
| 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 'raptor' | |
| class Posts | |
| end | |
| class Users | |
| end |