Skip to content

Instantly share code, notes, and snippets.

@7cc
7cc / importFromGist.js
Created September 11, 2019 21:48
js import from Gist
async function importFromGist(gistURL) {
var scriptText = await fetch(gistURL).then(res=> res.text())
var blob = new Blob([scriptText], {
type: "application/javascript"
})
var url = URL.createObjectURL(blob)
return await import(url)
}

Windowsでフォルダーを別ドライブに移動する

cmd.exe の move は同一ドライブ間でしか移動できない。
エラーメッセージ "アクセスは拒否されました"

cmd.exe

移動先にフォルダーネーム必須

@7cc
7cc / mabinogi-mobile.md
Created March 21, 2019 08:56
mabinogi mobile
@7cc
7cc / online_storage_comp-data-omakoku.tsv
Last active January 2, 2020 05:25
個人で使うオンラインストレージ比較
名称 料金 容量 ファイルの最大サイズ URL
Office 365 Personal $7 1TB 15GB https://onedrive.live.com/about/en-us/plans/
Office 365 Home $10 1TB*6 15GB
Amazon Drive(.com) $11/年 100GB
Amazon Drive(.com) $60/年 1TB
git config --global alias.up '!git remote update --prune; git merge --ff-only @{upstream}'
<repo> <branch> <commit>
# diff
git show /= git diff HEAD^ = git diff HEAD^..HEAD
git diff HEAD dev # branch
git diff HEAD v1 # tag
git diff @{u} # remote =? git diff FETCH_HEAD
SOH 
STX 
ETX 
EOT 
ENQ 
ACK 
BEL 
BS 
HT
LF -

node one liner

  • 実用的でない
  • windowsだとsjis問題に悩まされる

これをやりたい

echo "こんにちは" | perl -pe 's/にちは/ばんは/'
// RWBY字幕取り出し
// Google Chromeのコンソールで実行すると、各言語のリンクがコピーされます
fetch($$("video>source")[0].src)
.then(response=> response.text())
.then(getRoosterSub)
.then(copy)
.then(()=> console.log("コピーされました"))
function getRoosterSub(m3u8FileContent) {
return m3u8FileContent.split("\n")
@7cc
7cc / git-bash.txt
Last active February 11, 2020 19:54
command
$MSYSTEM
$PATH
"C:\Program Files\Git\usr\bin\bash.exe" -l
MSYS
/c/Users/UserName/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:Windows_PATH:/usr/bin/vendor_perl:/usr/bin/core_perl
"C:\Program Files\Git\usr\bin\sh.exe" -l
MSYS
/c/Users/UserName/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:Windows_PATH:/usr/bin/vendor_perl:/usr/bin/core_perl
"C:\Program Files\Git\bin\bash.exe" -l