Skip to content

Instantly share code, notes, and snippets.

View foomin10's full-sized avatar

foomin10

  • Japan
View GitHub Profile
@foomin10
foomin10 / _shellcheck.md
Last active May 4, 2024 02:25 — forked from eggplants/_shellcheck.csv
Enumerated shellcheck codes https://github.com/koalaman/shellcheck/wiki/Checks (Update: 05-21-2021)
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use s
@eggplants
eggplants / _shellcheck.csv
Last active February 9, 2024 12:11 — forked from nicerobot/_shellcheck.md
Enumerated shellcheck codes https://github.com/koalaman/shellcheck/wiki/Checks (Update: 05-21-2021)
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
"name","link","description"
"SC1000","https://github.com/koalaman/shellcheck/wiki/SC1000","$ is not used specially and should therefore be escaped."
"SC1001","https://github.com/koalaman/shellcheck/wiki/SC1001","This `\o` will be a regular 'o' in this context."
"SC1003","https://github.com/koalaman/shellcheck/wiki/SC1003","Want to escape a single quote? echo 'This is how it'\\''s done'."
"SC1004","https://github.com/koalaman/shellcheck/wiki/SC1004","This backslash+linefeed is literal. Break outside single quotes if you just want to break the line."
"SC1007","https://github.com/koalaman/shellcheck/wiki/SC1007","Remove space after = if trying to assign a value (or for empty string, use var='' ... )."
"SC1008","https://github.com/koalaman/shellcheck/wiki/SC1008","This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify."
"SC1009","https://github.com/koalaman/shellcheck/wiki/SC1009","The mentioned parser error was in ..."
"SC1010","https://github.com/koalaman/sh
@euske
euske / ffmpeg.md
Last active February 18, 2024 18:41 — forked from steven2358/ffmpeg.md
FFmpeg チートシート
@okapies
okapies / mastodon-ostatus.md
Last active September 5, 2021 11:39
Mastodon OStatus API の叩き方

Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。

host-meta

Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
@koseki
koseki / ISO639-1.txt
Last active February 1, 2022 21:41
ISO 639-1 Code => English Name text list / http://www.loc.gov/standards/iso639-2/ascii_8bits.html
aa Afar
ab Abkhazian
af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
an Aragonese
hy Armenian
as Assamese
@foomin10
foomin10 / ssh-keygen.md
Last active October 17, 2015 16:39
ssh-keygen メモ

参考

[Gehirn RS2] SSHキーをBitbucketに登録してgitコマンドを使えるようにする - Qiita
http://qiita.com/MegaBlackLabel/items/54f2a874acda6cb763f0

SSHキーの生成

ssh-keygen-C オプションはコメント。指定しないと ユーザー名@コンピュータ名 のようになる。

-f オプションで保存するファイル名を指定する。

@foomin10
foomin10 / git_commit_message.txt
Created October 6, 2015 14:49
Git コミットメッセージ
Fix:バグ修正
Add:機能追加
Modify:機能修正
Change:仕様変更
Clean:整理(リファクタリング)
Remove:削除
Upgrade:バージョンアップ
Revert:変更取り消し
var enums = {};
enums.keyboard = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAUSE: 19,
CAPS_LOCK: 20,
@aoitaku
aoitaku / symbol.rb
Last active March 29, 2017 02:36
Symbol#callでprocに変換して部分適用する
class Symbol
def call(*argv)
case
when block_given?
-> obj { self.to_proc[obj, *argv, &proc] }
when argv.size > 0
-> obj { self.to_proc[obj, *argv] }
else
self.to_proc
end
@nishio-dens
nishio-dens / gist:1437642199087fa23290
Last active October 6, 2015 12:49
自分用railsなプロジェクトでgitのコミットメッセージを一部自動生成するスクリプト
#!/usr/bin/env ruby
#
# .git/hooks/prepare-commit-msg に配置する
# RAILS用コミットメッセージ追加
if ARGV[1] && ARGV[1].include?("message")
files = `git diff --cached --name-only`
change_files = files.split("\n")