Skip to content

Instantly share code, notes, and snippets.

@ashizawa
ashizawa / mt-entries-to-json
Last active January 4, 2018 09:57 — forked from semicolon/mt-entries-to-json
[Movable Type のエントリー情報を JSON ファイルに出力するテンプレート]
キーを単純数値にするため、ToI企画さんの「データをJSON形式で出力する裏ワザ (http://tec.toi-planning.net/mt-column/tips/post-6/) 」を改変しています。
```
<mt:SetVar name="entries" function="undef" />
<mt:SetVar name="idx" value="0" />
<mt:Entries>
<mt:SetVar name="e" function="undef" />
<mt:SetHashVar name="e">
<mt:EntryID setvar="entry_id" />
<mt:EntryTitle setvar="entry_title" />
@ashizawa
ashizawa / supervisord-example.conf
Created February 6, 2016 16:58 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon

take2 は https://github.com/haru01/log/blob/master/pattern_sheed.md

TDD実践・学習パターン

TDDを 初心者が熟練者になって、現場で実践していくコツを書いていきます。 すべて実施する必要はありません。上から順に実施する必要もありません。 現状の診断や、自分の状況に合いそうなものを複数ピックアップして、 ベイビーステップで個人やチームの学習と成長の物語を描く道具として使われることを想定しています。

まだ未完です。ガンガン変わっていきます。 :p

@ashizawa
ashizawa / emacs-24.5-inline.patch
Last active September 14, 2015 07:11 — forked from takaxp/emacs-24.5-inline.patch
An inline patch for Emacs 24.5
diff -crN emacs-24.5/configure.ac emacs-24.5_patched/configure.ac
*** emacs-24.5/configure.ac 2015-04-02 16:23:06.000000000 +0900
--- emacs-24.5_patched/configure.ac 2015-04-12 00:10:11.000000000 +0900
***************
*** 1782,1788 ****
INSTALL_ARCH_INDEP_EXTRA=
fi
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
fi
@ashizawa
ashizawa / 20140826.md
Last active August 29, 2015 14:27 — forked from nulltask/20140826.md
Express / Socket.IO をスケールアウトしてみよう
@ashizawa
ashizawa / flux-utils.md
Last active August 29, 2015 14:27 — forked from azu/flux-utils.md
flux-utilsについて

flux-utils

facebook/flux 2.0.3で追加されたflux/utilsについて


flux-utils

  • Flux utilsは全ての機能を網羅するものじゃないよ
  • Utilsで満足できない場合は他のFluxフレームワークがあるよ
console.table(
Array.prototype.map.call(document.querySelectorAll('a'), function(item, index) {
return {
href: item.href,
target: item.target
};
})
);

Marvericksにアップデートした時にbrewで問題が出た場合

以下を試す

$ brew list | xargs -I{} brew upgrade {}
$ brew list | xargs -I{} brew unlink {} --force
$ brew list | xargs -I{} brew link {} --force

エラーになったパッケージは入れ直す

#!/usr/bin/env node
var querystring = require('querystring');
var https = require('https');
var fs = require('fs');
var url = process.argv[2];
var post_data = querystring.stringify({
id : url,