This file contains 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
[alias] | |
co = checkout | |
st = status -s | |
pr = pull --rebase | |
c = commit | |
a = add | |
al = add -A . | |
au = add -u | |
ap = add -p | |
b = branch |
This file contains 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
// 学習用 | |
// * See Also http://ookami86.github.io/event-sourcing-in-practice/#how-eventsourcing-works/04-restoring-objects-5.md | |
// * http://martinfowler.com/eaaDev/EventSourcing.html | |
// | |
function BanckingAccount(id, owner, balance, version) { | |
this.id = id || 0; | |
this.owner = owner || ""; | |
this.balance = balance || 0; | |
this.version = version || 0; | |
} |
This file contains 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
'use strict'; | |
var fetch = require('node-fetch'); | |
var assert = require('power-assert'); | |
function fetchPost() { | |
return fetch("http://jsonplaceholder.typicode.com/posts/1") | |
.then(function(res) { | |
return res.json(); | |
}).catch(function(e) { |
This file contains 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 'natto' | |
word_counters = {} | |
nm = Natto::MeCab.new | |
Dir::entries(".").select { |f| f.match /^ch.*\.re$/}.each do |file| | |
File.open(file, "r") do |f| | |
f.each_line do |line| | |
nm.parse(line) do |n| | |
word_counters[n.surface] = word_counters[n.surface] ? word_counters[n.surface] + 1 : 1 |
This file contains 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 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 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 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 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 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 |
OlderNewer