Skip to content

Instantly share code, notes, and snippets.

@ijs01140
ijs01140 / mc_symlink.ps1
Last active November 7, 2022 08:16
Minecraftの各バージョン用プロファイルフォルダを生やし、可能な限りシンボリックリンクを張るやつ
@ijs01140
ijs01140 / cloudflare_real_ip.conf
Created August 14, 2019 06:44
Cloudflare経由のアクセスのアクセス元IPアドレスを復元する、Nginx向けの設定ファイルです。/etc/nginx/conf.d/に置いておくといい感じに機能するはず。
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
@ijs01140
ijs01140 / 00-keyboard.conf
Created August 7, 2019 06:30
/etc/X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "jp"
Option "XkbOptions" "ctrl:swapcaps"
EndSection
@ijs01140
ijs01140 / 30-touchpad.conf
Created August 7, 2019 06:28
/etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "true"
Option "DisableWhileTyping" "true"
Option "Tapping" "on"
EndSection
#!/bin/bash
cd /usr/local/src/nginx/
sudo apt -y install dpkg-dev
sudo apt -y source nginx
latestnginxdir=$(ls | grep 'nginx-1.*' | sort -V | tail -n 1)
latestnginx=${latestnginxdir#nginx-} #remove 'nginx-'
nginxv=$(nginx -v 2>&1 > /dev/null)
currentnginx=${nginxv#nginx version: nginx/} #remove 'nginx version: nginx/'
@ijs01140
ijs01140 / 30-touchpad.conf
Created July 8, 2019 05:18
libinput用タッチパッドの設定ファイル
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "true"
Option "DisableWhileTyping" "true"
Option "Tapping" "on"
EndSection

Keybase proof

I hereby claim:

  • I am ijs01140 on github.
  • I am ijs01140 (https://keybase.io/ijs01140) on keybase.
  • I have a public key ASA_-5eGy_RRYvsDi79cqQgqBmV5o67HAjnWQhoYzW-lrQo

To claim this, I am signing this object:

@ijs01140
ijs01140 / DDEnc.ps1
Created May 5, 2018 18:28
環境変数だけ設定して、あとの処理をPostRecEnd.ps1に丸投げするスクリプト(もちろん、PostRecEnd.ps1が他のファイルの処理中のときは使用厳禁)
#TSファイルをD&Dで動作する
Set-Item env:FilePath -Value $Args[0] #引数を取得
Set-Item env:FileName -Value $([System.IO.Path]::GetFileNameWithoutExtension($env:FilePath))
#====================環境変数設定====================
#番組情報ファイルからServiceIDのある行を抜き出し変数SID10LINEにセット
$SID10LINE=$(Select-String -Pattern 'ServiceID' -LiteralPath "${env:FilePath}.program.txt" -Encoding default | ForEach-Object { $($_ -split":")[4] })
#SID10LINEの最後の8文字分を除き,環境変数SID10にセット
Set-Item env:SID10 -Value $($SID10LINE.substring(0,${SID10LINE}.length-8))
#番組情報ファイルからServiceNameのある行(2行目)を抜き出し環境変数ServiceNameにセット
@ijs01140
ijs01140 / vsc_syntaxhighlight_gist.css
Last active May 4, 2018 15:19
Gist用VSCode風syntaxhighlight
/*コメント色*/
div.gist .pl-c {
color: #608b4e;
}
/*デフォルト背景色*/
div.gist .blob-code {
background-color: #1E1E1E;
}
# _EDCBX_DIRECT_
# _EDCBX_HIDE_
#PostRecEndは視聴予約時にも実行できるので、視聴予約時なら終了
if ($env:RecMode -eq 4) { exit }
#==============ピークシフト機能(大嘘)===============
#時間を取得し、7以上且つ22未満(昼)の場合22時まで待つ
#もちろん言わずもがな夜間料金のため ※処理が追いつかないので中止※
<#
$nowhour=Get-Date -Format 'H'