Skip to content

Instantly share code, notes, and snippets.

View aiwas's full-sized avatar
💭
hey

Miyako Kuwano aiwas

💭
hey
View GitHub Profile
#!/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 の省電力設定
@eagletmt
eagletmt / sd-hd.rb
Last active December 18, 2015 16:19
SD -> HD または HD -> SD の切り替えがあるときに、HD または SD の先頭オフセットを見つける
#!/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']
;;; -*- coding: utf-8 -*-
;; okuri-ari entries.
つもあがt /ツモ和了;[麻雀]/
つもあがr /ツモ和了;[麻雀]/
つもt /自摸;[麻雀]/
つもt /ツモ;[麻雀]/
つもr /自摸;[麻雀]/
つもr /ツモ;[麻雀]/
くいながs /喰い流;[麻雀]/
くいなおs /喰い直;[麻雀]/
@semind
semind / nginx.conf
Created December 30, 2011 02:41
nginx cookbook
##### 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_フィールド名