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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.nginx</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<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
exports.logger = (options = {}) -> | |
_ = require 'underscore' | |
_.date = require 'moment' | |
util = require 'util' | |
options.format or= 'YY.MM.DD HH:mm:ss' | |
options.route or= null | |
return (req, res, next) -> | |
ini = Date.now() | |
end = res.end | |
res.end = -> |
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
# 例えば res.end なら | |
end = res.end | |
res.end = -> | |
res.end = end | |
res.emit 'end' | |
res.end.apply @, arguments | |
res.on 'end', -> |
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
preexec () { | |
[[ -z "`whence ${1%% *}`" ]] && echo "NOTFOUND!!! ${1%% *}" | |
} | |
# ---- # | |
preexec () { | |
cmd=${1%% *} | |
if [ -z "`whence ${cmd}`" ]; then | |
if [ $cmd = 'yabai' ]; then |
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
BubbleSort = (arr) -> | |
for a, i in arr | |
for a, j in ([2..(arr.length - i + 1)]) | |
if array[j] < array[j-1] | |
[array[j], array[j-1]] = [array[j-1], array[j]] | |
return arr |
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
@import 'fukidashi' | |
.item1 | |
fukidashi white 5px of 60px on left | |
// 親要素の左側、上から30px位置を中心とする「底辺10px、高さ5px」の白い三角形をつけます | |
.item2 | |
fukidashi red 12px of auto on right | |
// 親要素の右側、上から50%位置を中心とする「底辺24px、高さ12px」の赤い三角形をつけます |
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
#!/usr/bin/env node | |
require('coffee-script'); | |
// Local Scope | |
var fs = require('fs') | |
, path = require('path') | |
, util = require('util') | |
, hooker = require('hooker') | |
, cluster = require('cluster') |
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
#!/bin/bash | |
# Modified by Yu-Jie Lin for Bash from zsh version | |
ORG="$1" | |
if [[ ${ORG##*.} =~ JPG|jpg|JPEG|jpeg|GIF|gif|PNG|png ]]; then | |
CATWIDTH=$(tput cols) | |
SRC=$(mktemp).png |
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
#!/bin/sh | |
echo 'remove database' | |
atsutil databases -removeUser 2>&1 > /dev/null | |
atsutil server -shutdown 2>&1 > /dev/null | |
echo 'restart cache server...' | |
sleep 2 | |
atsutil server -ping |
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
#!/bin/zsh | |
######################### | |
# PLUSMATA | |
######################### | |
VERSION=0.0.3 | |
FONT_FAMILY=Plusmata | |
FONT_ASCENT=860 | |
FONT_DESCENT=200 |