This file contains hidden or 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
#!/usr/bin/awk -f | |
# resolv.awk - create Windows resolv.conf from ipconfig /all output | |
{ sub( /\r/, "", $NF) } # trim \r | |
# collect DNS domain suffixes | |
/D[Nn][Ss]\sSuffix[^:]*:\s\S/ { domain[$NF] = $NF } | |
# collect DNS search suffixes | |
/Search\sList[^:]*:\s\S/ { search[$NF] = $NF } |
This file contains hidden or 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
# PATH manipulation functions' library | |
# if $1 exists in $PATH then true | |
path_exists() { | |
echo ":$PATH:" | grep -q ":$1:" | |
} | |
# remove all occurence of $1 in $PATH. | |
remove_path_all() { | |
PATH="$(echo $PATH| sed ' |
This file contains hidden or 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
#!usr/bin/env bash | |
echo $(echo -n FrontPage|od -A x -t x1|sed "s/^......//;s/ //g"|tr "a-z" "A-Z").txt |
This file contains hidden or 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
#!/usr/bin/env bash | |
pname="$(basename $0)" | |
htdocs=/var/www/htdocs | |
logfile=/var/log/pyhttpd/httpd.log | |
pidfile=/var/run/pyhttpd.pid | |
port=8086 | |
httpd="python3 -m http.server --cgi $port" | |
proc_signature="[0-9]:[0-9][0-9] $httpd" |
This file contains hidden or 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
#!/usr/bin/env bash | |
for arg; do | |
name="$arg" | |
oldname="$arg" | |
while name=$(readlink "$name"); do | |
oldname="$name" | |
done | |
echo $oldname | |
done | |
unset name oldname |
This file contains hidden or 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
@echo off | |
:input | |
echo 1. msys2 | |
echo 2. mingw32 | |
echo 3. mingw64 | |
echo 4. clang64 | |
echo 5. ucrt64 | |
echo 0. quit | |
set /p menu="Which ? " | |
if %menu%/ == / goto input |
This file contains hidden or 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 | |
if grep -q '^NAME=.*openSUSE' /etc/os-release; then | |
source "$HOME/.ghcup/env" | |
elif grep -q '^NAME=.*MSYS2' /etc/os-release; then | |
source "$(cygpath -u ${GHCUP_INSTALL_BASE_PREFIX}\\ghcup\\env)" | |
fi |
This file contains hidden or 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
@echo off | |
echo TeraTerm Serial Port | |
set /p comport="Port: COM" | |
start "" "%TTBIN%\ttermpro.exe" /F="%TTETC%\teraterm.ini" /C=%comport% /W=com%comport% | |
rem pause |
This file contains hidden or 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
@if(0)==(0) echo off | |
cscript.exe //nologo //E:JScript "%~f0" %* | |
goto :EOF | |
@end | |
// メイン処理 | |
function main() { | |
var shortcut = null; | |
try { | |
// ショートカットを作成する |
NewerOlder