Skip to content

Instantly share code, notes, and snippets.

Matsushima, Kazuhiro Gab-km

Block or report user

Report or block Gab-km

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Gab-km
Gab-km / hgrc
Created Sep 2, 2011
hg fix "fixed message"
View hgrc
# hgrc
[extensions]
mq =
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py
[alias]
# fix latest commit message
fix = ! hg shelve --all -n 'tmp.hg-fix' && hg qtop > NUL & if errorlevel 1 ( hg qimport -r . && hg qrefresh -m "$1" && hg qfinish -a ) else ( hg qrefresh -m "$1" ) && hg unshelve -n 'tmp.hg-fix'
@Gab-km
Gab-km / hgrc
Created Sep 2, 2011
hg fix "fixed message"
View hgrc
# hgrc
[extensions]
mq =
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py
[alias]
# fix latest commit message
fix = ! hg shelve --all -n 'tmp.hg-fix' && hg qtop > NUL & if errorlevel 1 ( hg qimport -r . && hg qrefresh -m "$1" && hg qfinish -a ) else ( hg qrefresh -m "$1" ) && hg unshelve -n 'tmp.hg-fix'
@Gab-km
Gab-km / hgrc
Created Sep 4, 2011 — forked from troter/hgrc
hg fix "fixed message" # (hg 1.8.x only)
View hgrc
# hgrc
[extensions]
mq =
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py
[alias]
# fix latest commit message (hg 1.8.x only)
fix = ! \
$HG shelve --all -n 'tmp.hg-fix' && \
@Gab-km
Gab-km / hgrc
Created Sep 4, 2011 — forked from Gab-km/hgrc
hg fix ["fixed message"] (for Windows)
View hgrc
# hgrc
# if you use some Unix base operating systems, like Linux distributions, BSDs or Macs,
# see: https://gist.github.com/1187980
[extensions]
mq =
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py
[alias]
# fix latest commit message
@Gab-km
Gab-km / gist:1601627
Created Jan 12, 2012
簡易顔文字メーカー
View gist:1601627
# -*- coding: utf-8 -*-
import random
import datetime
left_brows = ['´', '', '']
left_eyes = ['', '^', '', '>', '']
mouths = ['ω', '', 'ρ', '_', 'Д', 'д', '']
right_eyes = ['', '^', '', '<', '']
right_brows = ['´', '', '']
@Gab-km
Gab-km / hgrc
Created Feb 19, 2012
hg now (for Windows)
View hgrc
# hgrc
# hg-now is the simple alias inspired by git-now.
# (http://d.hatena.ne.jp/sinsoku/20101208/1291770514)
# and it is for Windows environments.
# if you use some Unix base operating systems, like Linux distributions, BSDs or Macs,
# please hack it in your environment.
[alias]
# create a temporary commit.
now = ! hg commit -m "[from now] %date% %time%"
@Gab-km
Gab-km / myJsUnit.js
Created Mar 1, 2012
FizzBuzz with TDD in Javascript
View myJsUnit.js
function write(message) {
document.getElementById("output").innerHTML += message + "<br />";
}
function assertEquals(expected, actual) {
if (expected == actual) {
write("OK");
} else {
var text = "expected = [" + expected.toString()
+ "], but actual = [" + actual.toString() + "]."
@Gab-km
Gab-km / OptionTest.html
Created Mar 2, 2012
Option, which you may know as 'Maybe'.
View OptionTest.html
<!DOCTYPE html>
<html>
<head>
<title>Option test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="option.js"></script>
</head>
<body>
<div id="output" />
</body>
@Gab-km
Gab-km / TupleTest.html
Created Mar 2, 2012
Tuples, immutable groups ... but my tuples are very poor :(
View TupleTest.html
<!DOCTYPE html>
<html>
<head>
<title>Tuple test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="tuple.js"></script>
</head>
<body>
<div id="output" />
</body>
@Gab-km
Gab-km / smugnessProblem.rst
Created Apr 19, 2012
コードウォッチ:関数型プログラミングの自惚れ問題
View smugnessProblem.rst

コードウォッチ:関数型プログラミングの自惚れ問題

原文:http://www.sdtimes.com/link/36534
著者:Larry O'Brien

僕は関数型プログラミングが好きだ。次の10年にかけてコードの革命を起こしていくだろうと考えている:言語はより関数型の機能を採用していくだろうし、開発者はより関数型の技術を導入していくだろうし、いくつかの点では、関数型プログラミングの原則はコードを組み立てていく上で「自然で」もっとも明確なやり方だとみんな考えるようになっていくだろう。

だけど、僕はもうこのシナリオを本気にしちゃいない。関数型プログラミングは、ワクワクするものを学ぶことに興味があると言っている主流のプログラマにとって明白な、大きな問題を抱えている:関数型プログラマーは自惚れ野郎どもだってことだ。

You can’t perform that action at this time.