Skip to content

Instantly share code, notes, and snippets.

View simics-ja's full-sized avatar

Tomoyuki Shimizu simics-ja

View GitHub Profile
@simics-ja
simics-ja / conv.ps1
Last active March 12, 2022 08:39
[Powershellでffmpeg実行サンプル] #ffmpeg #Powershell
# ビットレートが半分のh265にエンコードして、.\done\に出力するスクリプト
# NVENC使うのでGeForce系のグラボないとダメ
$items = Get-ChildItem;
Write-Output $lines;
foreach($i in $items){
if($i.PSIsContainer -or [System.IO.Path]::GetExtension($i) -eq "ps1"){
continue;
}
@simics-ja
simics-ja / settings.json
Created July 23, 2020 13:41
Windows Terminal 設定
// This file was initially generated by Windows Terminal 1.1.2021.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@simics-ja
simics-ja / 01-setup.md
Last active July 17, 2022 22:18
[WSL2のlinuxbrew+zsh+zplug+PREZTO+Powerline環境セットアップ手順のメモ] #shell #wsl #ubuntu
@simics-ja
simics-ja / .textlintrc
Last active November 25, 2020 08:09
[LaTeX向けのtextlint設定] #textlint #LaTeX
{
"filters": {},
"rules": {
"preset-ja-engineering-paper": true,
"preset-ja-spacing": true,
"preset-ja-technical-writing": {
"ja-no-mixed-period": {
"periodMark": "."
},
"max-kanji-continuous-len": {
@simics-ja
simics-ja / enhance.ps1
Last active March 10, 2021 12:14
[TOPAZ Video Enhance AI スクリプト] 処理が途中で止まっても自動で再開するスクリプト #PowerShell
# TOPAZ Video Enhance AI Document
# https://help.topazlabs.com/hc/en-us/articles/360046455552-Command-Line-Interface-Documentation
$INPUT_VIDEO = "input.mp4"
$OUTPUT = "output.mp4"
New-Item -Name "images" -ItemType "directory"
# オリジナル動画のフレームレートの取得(小数点第三位以下切り捨て)
(ffprobe -loglevel quiet -show_streams -print_format json "input.mp4" | ConvertFrom-Json).streams[0].r_frame_rate -match "(.*)\/(.*)"
$FRAME_RATE = [Math]::Truncate(([double]$Matches[1] / [double]$Matches[2]) * 100)/100
@simics-ja
simics-ja / 01-git-add.md
Last active January 24, 2022 01:33
[gitコマンド備忘録] 逆引き風にまとめていく #git

add

最新のファイルをステージ

$ git add <file>

add実行した時点のファイルの状態をステージするので注意

git add -Aとgit add .の違い

@simics-ja
simics-ja / 00-ultrasoul.md
Last active June 23, 2021 00:46
[Golang 備忘録] 自分用リファレンス #Golang

ウ・ル・ト・ラ・ソウッ!\ハーイ!/

Printf

値の挿入は%vを使う

fmt.Printf("ウ・ル・ト・ラ・%v! \%v/", "ソウッ!", "ハーイ!")

4文字幅でパディング&アライメントするときは、%4vのように正の値なら左側に空白を置いでパディングされ、%-4vのように負の値なら空白を右側に置くようにパディングされる

@simics-ja
simics-ja / memo.md
Created May 20, 2021 12:32
[Svelte備忘録] 雑にまとめていく #JavaScript # Svelte

Svelte備忘録

@simics-ja
simics-ja / karabinerの設定.md
Last active June 5, 2025 08:41
[Niz Atom 66 キーボード設定メモ] めっちゃ分かりにくいのでメモ

基本的にMacにWindowsキーボードとして認識させ,karabinerでうまいこと割り当てて運用する.

Traget Deviceを

  • Niz BT5.0(Nordic): 一度有線接続したことがある場合
  • Unknown(Nordic): 有線接続したことがない場合

として,以下の設定を行う

  • left_command -> left_option
@simics-ja
simics-ja / curl.md
Created June 23, 2021 01:27
[curl] #shell # curl

リクエスト内容も表示する

-vオプションをつける

$ curl -v google.co.jp                                            
*   Trying 172.217.175.99...
* TCP_NODELAY set
* Connected to google.co.jp (172.217.175.99) port 80 (#0)
> GET / HTTP/1.1