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フレームワークがあるよ

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 bash
# author: Thomas Aylott SubtleGradient.com
echo "Transmitting"
for i in `git log -${1:-1} $2 --name-only|grep -E '^[^ ]+$'|sort|uniq`; do
if [[ -e $i ]]; then
echo " $i"
open -a Transmit $i
fi
done
@ashizawa
ashizawa / 0_reuse_code.js
Created November 5, 2013 06:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
### define function variable before block to avoid code being appended to closing part of JSDoc comment ###
cube = ''
###*
* Funtion to calculate cube of input
* @param {number} Number to operate on
* @return {number} Cube of input
###
cube = (x) -> x*x*x