Ref なぜ僕は公式ドキュメントを読むのが苦手なのか #初心者 - Qiita
次のようなセクションがあった場合、何を読むかというのはその目的によって異なるという印象。
- Getting Started: インストール、セットアップ
- Tutorial: 基本的な使い方(代表的な使い方)
- Concepts: デザインのコンセプト、なぜ作ったか
- Examples: 動くサンプル
- API Reference: APIのリファレンス
Ref なぜ僕は公式ドキュメントを読むのが苦手なのか #初心者 - Qiita
次のようなセクションがあった場合、何を読むかというのはその目的によって異なるという印象。
| # 📝 [Note] Mode -- if commit message starts with "📝" or includes "[Note]" | |
| IS_NOTE_MODE=$(git log -1 --pretty=%B | grep -E '^(📝|\[Note\])') | |
| if [[ -n "${IS_NOTE_MODE}" ]]; then | |
| # メモの作業内容を戻すコミットをする | |
| headSHA=$(git rev-parse HEAD) | |
| git revert --no-commit HEAD | |
| git ls-tree -r --name-only HEAD | xargs git commit -m "↩️ ${headSHA}" -- | |
| # メモを書く直前の状態に作業内容を戻す | |
| git revert --no-commit HEAD | |
| # terminal notification |
SQLサーバから別のところに侵入するパターンで、SQLサーバ上でOSのコマンドを利用してるケースが増えている。 各SQLサーバでOSコマンドを実行する方法を知りたい。
| Type | How To | Status |
|---|---|---|
| SQL Server | xp_cmdshell |
Disable by Default |
| MySQL | system (\!) |
Enable in Terminal |
| PostgreSQL | COPY |
Require pg_execute_server_program role |
| // ==UserScript== | |
| // @name Bluesky: auto refresh | |
| // @namespace https://efcl.info | |
| // @match https://bsky.app/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author azu | |
| // @description Auto Refresh when notifications is shown | |
| // ==/UserScript== | |
| const origSetInterval = window.setInterval; |
| function git-auto-commit(){ | |
| git_status=$(git status --porcelain | grep -vE '^\s') | |
| first=$(echo "$git_status" | head -n1) | |
| filename=$(echo "$first" | awk '{print $NF}') | |
| git_root_dir=$(git rev-parse --show-toplevel) | |
| if echo "$first" | grep -Eq '^\s?M'; then | |
| commit_message="Update $filename" | |
| elif echo "$first" | grep -Eq '^\s?A'; then | |
| commit_message="Add $filename" | |
| elif echo "$first" | grep -Eq '^\s?D'; then |
| 企業名 | 2022年の順位 | 2023年の順位 |
|---|---|---|
| 株式会社メルカリ | 1 | 1 |
| Google LLC | 2 | 2 |
| LINE株式会社 | 3 | 3 |
| ヤフー株式会社 | 4 | 4 |
| 株式会社サイバーエージェント | 5 | 5 |
| rg "https://s3.amazonaws.com/github/ribbons/" --files-with-matches -0 | xargs -0 sed -i '' 's/https:\/\/s3.amazonaws.com\/github\/ribbons\//https:\/\/github.blog\/wp-content\/uploads\/2008\/12\//g' |
ni - use the right package manager
Original: https://github.com/antfu/ni
| function gh-issue-checkout(){ | |
| INITIAL_QUERY="$1" | |
| GH_ISSUE_LIST="gh issue list -S" | |
| FZF_DEFAULT_COMMAND="$GH_ISSUE_LIST '$INITIAL_QUERY'" \ | |
| gh issue list | \ | |
| fzf --layout=reverse \ | |
| --bind "change:reload:$GH_ISSUE_LIST {q} || true,ctrl-o:execute(echo {} | xargs gh issue view --web)+abort"\ | |
| --preview "gh issue view {1} | bat --color=always --style=grid --file-name O.md" \ | |
| --header 'Press Ctrl+O to open issue' \ | |
| | awk '{print $1}' | xargs -IXXX gh issue develop XXX --name "feature/XXX" --checkout |