Skip to content

Instantly share code, notes, and snippets.

View aiwas's full-sized avatar
💭
hey

Miyako Kuwano aiwas

💭
hey
View GitHub Profile
@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_フィールド名
;;; -*- coding: utf-8 -*-
;; okuri-ari entries.
つもあがt /ツモ和了;[麻雀]/
つもあがr /ツモ和了;[麻雀]/
つもt /自摸;[麻雀]/
つもt /ツモ;[麻雀]/
つもr /自摸;[麻雀]/
つもr /ツモ;[麻雀]/
くいながs /喰い流;[麻雀]/
くいなおs /喰い直;[麻雀]/
@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']
#!/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 の省電力設定
@Nunocky
Nunocky / gist:c19b0d99c03dad587fb2
Created March 2, 2015 06:30
nfc-list失敗 (一度成功したあとにもう一度実行)
> LIBNFC_LOG_LEVEL=3 nfc-list
debug libnfc.config key: [allow_intrusive_scan], value: [yes]
debug libnfc.config Unable to open directory: /usr/local/Cellar/libnfc/1.7.0/etc/nfc/devices.d
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to true
debug libnfc.general 0 device(s) defined by user
nfc-list uses libnfc 1.7.0
debug libnfc.general 0 device(s) found using arygon driver
debug libnfc.general 0 device(s) found using pn532_uart driver
@asm256
asm256 / CM3D2.ArchiveReplacer.Hook.cs
Last active May 26, 2017 20:01
CM3D2.ArchiveReplacer
/*
* コンパイルしてManagedフォルダ内へ置いてください
* csc /t:library /r:Assembly-CSharp-firstpass.dll CM3D2.ArchiveReplacer.Hook.cs
* CM3D2_KAIZOU\_Data フォルダに追加・置換したいファイルを置いてください
*/
// @AB_addarg /r:Assembly-CSharp-firstpass.dll
// @AB_addarg /lib:%managed%
// @AB_install %managed%
using System;
@dearing
dearing / docker-nftables.conf
Created February 25, 2016 14:26
nftables with docker
# /etc/systemd/system/docker.service.d/docker-nftables.conf
# disable iptables in docker, allowing nftables to do work
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false
@rokugasenpai
rokugasenpai / how_to_download_streaming_jp.md
Last active December 17, 2023 09:50
各ストリーミング配信のダウンロード方法(要curl・ffmpeg・rtmpdump・chrome・limechat・wireshark)

ツイキャス

@pacochi
pacochi / mastodon_show_faboo.user.js
Last active December 12, 2022 09:28
Mastodon の静的ページに⭐🔃した人のアイコンを表示します。
// ==UserScript==
// @name [Mastodon] show ⭐🔃 on static pages
// @namespace hen.acho.co
// @include /^https?:\/\/[^\/]+\/(?:@\w+|users\/\w+\/(?:statuses|updates))\/\d+/
// @version 1.221212
// @description add favoriter or booster icons next to counts
// @downloadURL https://gist.github.com/pacochi/d466d481fa9aa982c2f206815765fd53/raw/mastodon_show_faboo.user.js
// @run-at document-idle
// @grant none
// ==/UserScript==
@pacochi
pacochi / mastodon_em_visibility.user.css
Created May 8, 2018 13:36
Mastodon の見えにくい公開範囲を分かりやすく表示します。
/*
元 : https://mstdn.maud.io/@unarist/99654429632902892
崩れるところも結構あるらしい
*/
.status-unlisted::before, .status-private::before {
display: block;
position: absolute;
width: 14px;
height: 14px;
left: 10px;