Skip to content

Instantly share code, notes, and snippets.

View sho-t's full-sized avatar
🎆
Life is Japanese sparklers.

sho90 sho-t

🎆
Life is Japanese sparklers.
View GitHub Profile
@sho-t
sho-t / zsh_variable.md
Last active September 20, 2023 12:56
Zsh 変数メモ

variable

変数に関するメモ。 💤がついてるのはzsh 固有のもの。

📮 シェル変数と環境変数

  • シェル変数 → 子プロセスに継承されない
  • 環境変数 → 子プロセスに継承される

環境変数登録

@sho-t
sho-t / shell_brackets_memo.md
Last active November 29, 2018 07:17
shellの括弧メモ

shell 括弧色々メモ

bash保育園にいた頃 $()とか${}とかでてきて混乱しました。 メモです。多分全てではありません。

{} (braces)

グループコマンド(group command)

複数のコマンド(の出力)をまとめる

$ {
@sho-t
sho-t / shell_redirect.md
Last active November 29, 2018 03:03
shellのリダイレクトメモ

shell リダイレクトのメモ

リダイレクトについてメモってく

環境

zsh 5.5.1

ファイル記述子(ファイルディスクリプタ)

とにもかくにもこいつがでてくる
ファイル記述子(ファイルディスクリプタ)とは。 下記抜粋

@sho-t
sho-t / git_not_to_self.md
Last active June 29, 2018 12:53
git note to self

初回push

git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:sho-t/gittutorial.git
git push -u origin master```
@sho-t
sho-t / isexistsfiles.sh
Created May 25, 2018 03:57
ファイル存在チェックでワイルドカード使いたい
#!/bin/bash
files="/temp/hoge*.txt"
[ -z "$(ls $files 2>/dev/null)" ] && exit 1
@sho-t
sho-t / es6.js
Created May 25, 2018 01:27
javascript雑記
// 2次元配列の初期化
[...Array(3)].map(() => Array(3).fill(0));
const foo = { a: 1, b: 2 };
// オブジェクトのクローン
const bar = { ...foo }; // => { a: 1, b: 2 }
// 特定の値の分割代入
let kbyd = ['輿水幸子', '姫川友紀', '小早川紗枝'];