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
| // inspired by: https://mlog.nektro.net/ | |
| git-newbranchname() { | |
| rand=$(actualrandom 2) | |
| echo "vova-patch-${rand}" | |
| } | |
| git-newbranch() { | |
| git checkout -b $(git-newbranchname) | |
| } |
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
| choco install yt-dlp | |
| choco install ffmpeg | |
| yt-dlp --extract-audio http://youtube.com/... |
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
| ln -s /path/to/storage/app/public /path/to/public_html/storage |
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
| <?php | |
| function sendTelegramMessage($chatID, $message, $token) { | |
| $url = "https://api.telegram.org/bot" . $token . "/sendMessage"; | |
| $data = ['chat_id' => $chatID, 'text' => $message, 'parse_mode' => 'HTML']; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_POST, true); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
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
| { | |
| "description": "Change Command + h/j/k/l to Arrows", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "j", | |
| "modifiers": { | |
| "mandatory": [ | |
| "command" | |
| ], |
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
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| !j:: | |
| Send, {Left down}{Left up} | |
| Return | |
| !k:: |
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
| Show all envirnoment variables | |
| ``` | |
| ls env: | |
| ``` | |
| Refresh environment variables | |
| ``` | |
| refreshenv | |
| ``` |
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
| git config --global alias.mr 'push origin HEAD' | |
| git config --global alias.undo 'reset --soft HEAD~1' |
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
| ~/.zshrc or ~/.bash_profile | |
| listening() { | |
| if [ $# -eq 0 ]; then | |
| sudo lsof -iTCP -sTCP:LISTEN -n -P | |
| elif [ $# -eq 1 ]; then | |
| sudo lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1 | |
| else | |
| echo "Usage: listening [pattern]" | |
| fi |