Skip to content

Instantly share code, notes, and snippets.

Sub セル結合()
Selection.Merge
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
End With
End Sub
Sub 同値セル結合()
Application.DisplayAlerts = False
(let ((x 0))
(do ()
((not (< x 3)))
(print x)
(setq x (1+ x))))
(defmacro while (test &body body)
`(do ()
((not ,test))
,@body))
> coffee -e -p "number: 42"
(function(){
var number;
number = 42;
})();
> coffee -e -p "square: (x) -> x * x"
(function(){
var square;
square = function square(x) {
return x * x;
};
})();
<!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>
gem list | while read n v; do sudo gem uninstall $n -a ; done
$:.unshift(File.dirname(__FILE__))
require 'spec_helper'
module BowlongGameMacro
class BowlongGamePlayer
def initialize
@game = Game.new
end
def roll_spare
<!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}
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 }
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