Skip to content

Instantly share code, notes, and snippets.

View shoito's full-sized avatar
🏠
Working from home

shoito shoito

🏠
Working from home
View GitHub Profile
@hail2u
hail2u / csslint-rules.md
Last active April 29, 2023 14:59
CSSLintのRulesの超訳

訳注

これは超訳です。

CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!

この訳はCSSLintと同じライセンスで提供されます。

Possible Errors

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mikeda
mikeda / nginx.conf
Last active May 12, 2019 23:21
Nginxでクエリストリングを見て振り分け先を切り替える。 http://localhost/test.txt?para1=AAA ならバランサ1、 http://localhost/test.txt?para1=CCC ならバランサ2
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@fcalderan
fcalderan / perftest.sh
Last active March 8, 2017 14:37
A small bash utility for testing slower connection. Use chmod +x perftest.sh to make the script executable. Thanks to Matteo Rosati for sharing basic commands
#!/bin/sh
CMD="$1"
RATE="$2"
DELAY="$3"
if [ "$RATE" = "" ] ; then
RATE=500
fi
if [ "$DELAY" = "" ] ; then
@voluntas
voluntas / shiguredo_tech.rst
Last active May 13, 2025 02:58
時雨堂を支える技術

時雨堂を支える技術

日時:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言語

@voluntas
voluntas / shiguredo.rst
Last active June 12, 2025 03:08
時雨堂コトハジメ
@mercul3s
mercul3s / gist:56d73cb74ed71bf0813e
Created September 3, 2014 20:34
Example dashing job for elasticsearch cluster health
require 'elasticsearch'
# defaults to "localhost"
client = Elasticsearch::Client.new log: true
SCHEDULER.every '5s', :first_in => 0 do |job|
health = client.cluster.health
send_event('es_health', {value: health['status']})
end
@azu
azu / react-toggle.md
Last active August 22, 2018 02:01
ReactでToggleコンポーネントを作るケース
  1. ABToggleButtonのような実装を各Toggleしたいコンポーネントごとに作る
    • クラスが増える
    • class ABToggleButton extends React.Component{}
    • ToggleButtonごとに明示的な名前をつけられる
    • <ABToggleButton isEditing={true}/>
    • 必要なコンポーネント = 3ファイル
  2. 関数を使う
    • 引数にa, b
    • createToggleButton(a, b);
  • 高階関数を使うパターン

Get/set ID3 meta tags using ffmpeg

A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.

FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.

1. Read ID3 metadata

To list all global metadata tags for a media file, just set an input but no output file.