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
# Common aliases. | |
# regular | |
alias al="vi ~/.bash_aliases && . ~/.bash_aliases" | |
alias touchh='a=$(date +%Y%m%d%H%M%S);touch ${a}.md' | |
alias duu='du -d 1 -h 2>/dev/null | sort -hr' | |
alias dff="df -h | grep -v -E '(loop|tmpfs)'" | |
alias cc="clear && clear" | |
alias syslog="tail -f /var/log/syslog" | |
alias his="history -w && cat ~/.bash_history | tail -n 100" |
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
rundll32 user32.dll,LockWorkStation |
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/php | |
<?php | |
if (!isset($_SERVER['argv'][1])) { | |
echo 'Example: C:\Users\ijortengab\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json'.PHP_EOL; | |
echo 'The location of settings.json file: '; | |
if (FALSE !== ($line = fgets(STDIN))) { | |
$filename = rtrim($line); | |
} | |
} |
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
#+a:: | |
{ | |
if WinExist("ahk_exe WindowsTerminal.exe") | |
WinActivate | |
else | |
Run "wt.exe" | |
} | |
#+n:: | |
{ | |
if WinExist("ahk_exe notepad++.exe") |
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
red() { echo -ne "\e[91m" >&2; echo -n "$@" >&2; echo -ne "\e[39m" >&2; } | |
green() { echo -ne "\e[92m" >&2; echo -n "$@" >&2; echo -ne "\e[39m" >&2; } | |
yellow() { echo -ne "\e[93m" >&2; echo -n "$@" >&2; echo -ne "\e[39m" >&2; } | |
blue() { echo -ne "\e[94m" >&2; echo -n "$@" >&2; echo -ne "\e[39m" >&2; } | |
magenta() { echo -ne "\e[95m" >&2; echo -n "$@" >&2; echo -ne "\e[39m" >&2; } | |
error() { echo -n "$INDENT" >&2; red '#' "$@" >&2; echo >&2; } | |
success() { echo -n "$INDENT" >&2; green '#' "$@" >&2; echo >&2; } | |
chapter() { echo -n "$INDENT" >&2; yellow '#' "$@" >&2; echo >&2; } | |
title() { echo -n "$INDENT" >&2; blue '#' "$@" >&2; echo >&2; } | |
code() { echo -n "$INDENT" >&2; magenta "$@" >&2; echo >&2; } |
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
# @filename: C:\ProgramData\bin\wsl.ps1 | |
# @created: IjorTengab <http://ijortengab.my.id> | |
# @last-modified: 20240111 Kamis | |
# @reference: https://jwstanly.com/blog/article/Port+Forwarding+WSL+2+to+Your+LAN/ | |
# @reference: https://www.askvg.com/fix-users-must-enter-a-user-name-and-password-to-use-this-computer-checkbox-missing-in-windows-10/ | |
# | |
# | |
# | |
# Script untuk Menjalankan WSL2 secara otomatis | |
# plus autorun service |
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 php | |
<?php | |
/** | |
* @file | |
* adjust-json-config-windows-terminal-variant-1.php | |
* @author: | |
* IjorTengab <https://ijortengab.id> | |
*/ | |
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') { |
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
Windows Registry Editor Version 5.00 | |
; Created by: Shawn Brink | |
; http://www.tenforums.com | |
; Tutorial: http://www.tenforums.com/tutorials/2712-quick-access-add-remove-frequent-folders-windows-10-a.html | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer] | |
"ShowFrequent"=dword:00000000 |
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
vercomp () { | |
if [[ $1 == $2 ]]; then return 0; fi | |
local IFS=. | |
local i ver1=($2) ver2=($1) | |
# fill empty fields in ver1 with zeros | |
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) | |
do | |
ver1[i]=0 | |
done | |
for ((i=0; i<${#ver1[@]}; i++)) |
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/bash | |
# | |
# @filename: check-nginx-server-name.sh | |
# @version: 1.0 | |
# @release-date: 20201223 | |
# @author: IjorTengab <[email protected]> | |
# | |
# Shell Script ini ditujukan bagi anda yang menggunakan Nginx dan mau mengecek | |
# setiap virtual host yang terdapat pada directive server_name. |
NewerOlder