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 | |
# ref: http://ssig33.com/text/VAIO%20Pro%20%E3%82%92%20Linux%20%E3%81%A7 | |
# USB の自動サスペンド | |
for F in `ls /sys/bus/usb/devices/usb[0-9]*/power/autosuspend` | |
do | |
sudo sh -c "echo 1 > ${F:?}" | |
done | |
# WiFi の省電力設定 |
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 ruby | |
# coding: utf-8 | |
require 'open3' | |
require 'tempfile' | |
class Avconv | |
def initialize(path, bin = 'avconv') | |
@path = path | |
@bin = bin | |
@tempfile = Tempfile.new ['sd-hd', '.ts'] |
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
;;; -*- coding: utf-8 -*- | |
;; okuri-ari entries. | |
つもあがt /ツモ和了;[麻雀]/ | |
つもあがr /ツモ和了;[麻雀]/ | |
つもt /自摸;[麻雀]/ | |
つもt /ツモ;[麻雀]/ | |
つもr /自摸;[麻雀]/ | |
つもr /ツモ;[麻雀]/ | |
くいながs /喰い流;[麻雀]/ | |
くいなおs /喰い直;[麻雀]/ |
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
##### nginxでリバースプロキシして後段でエラーが発生した場合にnginx側でエラーページの制御をしたい時の設定 ##### | |
proxy_intercept_errors on; # errorをproxy側で肩代わりする設定 | |
error_page 403 404 500 502 503 504 /error.html; # /var/www/html/error.htmlを置いておく | |
location /error.html { | |
root /var/www/html/; | |
} | |
#### headerの値を参照する #### | |
$http_フィールド名 |
NewerOlder