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
| Sub セル結合() | |
| Selection.Merge | |
| With Selection | |
| .HorizontalAlignment = xlGeneral | |
| .VerticalAlignment = xlCenter | |
| End With | |
| End Sub | |
| Sub 同値セル結合() | |
| Application.DisplayAlerts = False |
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
| (let ((x 0)) | |
| (do () | |
| ((not (< x 3))) | |
| (print x) | |
| (setq x (1+ x)))) | |
| (defmacro while (test &body body) | |
| `(do () | |
| ((not ,test)) | |
| ,@body)) |
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
| > coffee -e -p "number: 42" | |
| (function(){ | |
| var number; | |
| number = 42; | |
| })(); |
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
| > coffee -e -p "square: (x) -> x * x" | |
| (function(){ | |
| var square; | |
| square = function square(x) { | |
| return x * x; | |
| }; | |
| })(); |
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 http-equiv="content-type" content="text/html;charset=UTF-8" /> | |
| <title>CoffeeScript Sandbox</title> | |
| </head> | |
| <body> | |
| <script type="text/coffeescript"> | |
| alert "hello coffee" | |
| </script> |
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 list | while read n v; do sudo gem uninstall $n -a ; done |
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
| $:.unshift(File.dirname(__FILE__)) | |
| require 'spec_helper' | |
| module BowlongGameMacro | |
| class BowlongGamePlayer | |
| def initialize | |
| @game = Game.new | |
| end | |
| def roll_spare |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <title>{Title}{block:PostTitle} / {PostTitle}{/block:PostTitle}</title> | |
| <link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/> | |
| <link rel="Shortcut Icon" type="image/png" href="{Favicon}" /> | |
| {block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description} | |
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 Array | |
| def maps(*methods) | |
| methods = [methods].flatten | |
| self.map do |node| | |
| methods.inject(node) {|result, method| method.call(result) } | |
| end | |
| end | |
| end | |
| twice = lambda {|node| node * 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
| require 'rubygems' | |
| require 'mongo_mapper' | |
| require 'pp' | |
| MongoMapper.database = 'accounting-patterns' | |
| # see accounting transaction http://martinfowler.com/apsupp/accounting.pdf | |
| class AccountService | |
| class AcccountingRunner | |
| def initialize | |
| @transaction = AccountingTransaction.new |
OlderNewer