更新: | 2024-05-20 |
---|---|
作者: | @voluntas |
バージョン: | 2024.1 |
URL: | https://voluntas.github.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do | |
echo "userspace" | sudo tee $i; | |
done | |
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies | |
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed; do | |
echo 2601000 | sudo tee $i; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sourcekit-lsp.serverPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp", | |
"sourcekit-lsp.serverArguments": [ | |
"-Xswiftc", | |
"-sdk", | |
"-Xswiftc", | |
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.7.sdk", | |
"-Xswiftc", | |
"-target", | |
"-Xswiftc", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# converts IPv4 as "A.B.C.D" to integer | |
# ip4_to_int 192.168.0.1 | |
# => 3232235521 | |
ip4_to_int() { | |
IFS=. read -r i j k l <<EOF | |
$1 | |
EOF | |
echo $(( (i << 24) + (j << 16) + (k << 8) + l )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example: Set-PowerShellUICulture -Name "en-US" | |
function Set-PowerShellUICulture { | |
param([Parameter(Mandatory=$true)] | |
[string]$Name) | |
process { | |
$culture = [System.Globalization.CultureInfo]::CreateSpecificCulture($Name) | |
$assembly = [System.Reflection.Assembly]::Load("System.Management.Automation") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# parsrc.sh | |
# CSV(Excel形式(RFC 4180):ダブルクォーテーションのエスケープは"")から | |
# 行番号列番号インデックス付き値(line field indexed value)テキストへの正規化 | |
# (例) | |
# aaa,"b""bb","c | |
# cc",d d | |
# "f,f" | |
# ↓ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If the process is already running, you can use the following: | |
PID=`pgrep processname` | |
renice -n 19 $PID | |
ionice -c 3 -p $PID | |
# For new processes, just chain them together | |
nice -n 19 ionice -c 3 processname |