Skip to content

Instantly share code, notes, and snippets.

View mojagehub's full-sized avatar

yo mojagehub

  • japan
View GitHub Profile
@mojagehub
mojagehub / bashMemo.md
Last active April 2, 2019 06:24
Useful Bash Commands

bashのコマンド・チートシート

コマンド 説明
CMD1; CMD2 ;CMD1の結果に関わらずCMD2も実行される
CMD1 && CMD2 &&CMD1の結果が正常な場合のみCMD2が実行される
`CMD1
`CMD
`CMD
CMD & バックグラウンド実行
@mojagehub
mojagehub / gitBranch.md
Last active January 12, 2017 08:39
git branch Management commands

Branch Management

シンタックス 説明
$ git branch ブランチの一覧表示
$ git branch [branch name] ブランチを作成
$ git branch -m [before branch name] [after branch name] ブランチ名を変更
git branch -d [branch name] ブランチの削除
$ git checkout [branch name] ブランチの切り替え
$ git checkout [branch name A] && $ git merge [branch name B] ブランチAにBをマージする
@mojagehub
mojagehub / console.js
Created January 10, 2017 16:44
console test
console.log("hello world!");
@mojagehub
mojagehub / iso.md
Last active January 12, 2017 08:40
Collection of ISO

ISOの標準規格

ISO 種別
ISO 639 言語名コード 日本語 = ja, jpn / 朝鮮語 = ko, kor / 中国語 = zh, zho, chi, zho / ドイツ = de, deu, ger, deu
ISO 3166-1 国名コード 日本 = Japan / 西サハラ = Western Sahara / ニューカレドニア = New Caledonia
ISO 3166-2:JP 日本の都道府県コード JP-01 = 北海道 / JP-02 = 青森県 / JP-03 = 岩手県
ISO 4217 通貨名コード 円 = JPY / ケニア・シリング = KES / キルギス・ソム = KGS
ISO 5218 性別コード 0 = not known(不明) / 1 = male(男性) / 2 = female(女性) / 9 = not applicable(適用不能)
ISO 22324 深刻度を表わすカラーコード 赤 = 危険 / 黃 = 注意 / 緑 = 安全
@mojagehub
mojagehub / install_nodejs.md
Last active January 12, 2017 08:40
node.js installation

Node.js

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
$ source ~/.bashrc
$ nvm install stable
$ node -v
$ nvm alias default stable
@mojagehub
mojagehub / firewalld.md
Created January 6, 2017 14:47
firewalld how to open ports

許可されているサービスやポートの一覧を表示

$ firewall-cmd --list-all --zone=public
$ firewall-cmd --list-services --zone=public
$ firewall-cmd --list-ports --zone=public

許可するサービスの追加と削除

@mojagehub
mojagehub / jsDevFrame.md
Last active January 12, 2017 08:41
JavaScript開発体系_2017/1/5

JavaScript DevEnv

Category Tools
Frontend MVC, MVVM, Virtual DOM
Package Manager npm
Composer Using AMD/common.js via WebPack/Browserify(AMDは結合しない非同期読み込みもあり)
Postprocessor Transpile(Babel/TypeScript), compress, minify
Task Manager npm scripts
Runtime node.js
@mojagehub
mojagehub / download.js
Last active January 4, 2017 16:22
Webページで編集した内容をJavascriptから動的にダウンロードする
// クリック時の動作を指定する
var btn = document.getElementById('download');
btn.addEventListener('click', function() {
// テキストエリアから入力内容を取得する
var content = document.getElementById('content').value;
// テキストファイルをBlob形式に変換する
let blob = new Blob([content]);
@mojagehub
mojagehub / gitCommands.md
Last active January 12, 2017 08:41
gitCommandNotes

Git Standard Commands

サブコマンド シンタックス 説明
init $ git init リポジトリの作成
add $ git [file name] ファイルやディレクトリをインデックスに追加
commit $ git commit インデックスに追加されたファイルをコミット
status $ git status 前回のコミットとの比較
log $ git log コミットログの表示
diff $ git diff インデックスとワーキングツリーの差分を表示
@mojagehub
mojagehub / justify.scss
Created December 29, 2016 18:43
テキストの両端を綺麗に揃える
.justify {
text-align: justify;
text-justify: inter-ideograph;
}