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
| while IFS= read -r line; do sed -i -E ':a;N;$!ba;s,(#[^\n]+)\n\n---\n(.*)\n---\n,---\n\2\n---\n\n\1\n,g' "$line"; done <<< `find -type f -iname '*.md'` |
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
| while IFS= read -r line; do sed -i -E 's|/blog/([0-9]+)/([0-9]+)/([0-9]+)/([^/\)]+)/|/blog/\1/\2-\3-\4\.md|g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's|/blog/([0-9]+)/([0-9]+)/([0-9]+)/([^/\)]+)|/blog/\1/\2-\3-\4\.md|g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's,^<http(s)?([^>]+)>,http\1\2,g' "$line"; done <<< `find -type f -iname '*.md'` |
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
| while IFS= read -r line; do sed -i -E ':a;N;$!ba;s,#\ *draft:\ *true\n,,g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E ':a;N;$!ba;s,---\n---\n,,g' "$line"; done <<< `find -type f -iname '*.md'` |
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
| while IFS= read -r line; do sed -i -E ':a;N;$!ba;s,---\ntitle:\ +([^\n]+)\n,# \1\n\n---\n,g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E ':a;N;$!ba;s,---\n---\n,,g' "$line"; done <<< `find -type f -iname '*.md'` |
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
| while IFS= read -r line; do sed -i -E 's,^[^!]?\[([^]]+)\]\(image://ijortengab\.id/,![\1]\(/images/,g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's,^!\[([^]]+)\]\(image://ijortengab\.id/,![\1]\(/images/,g' "$line"; done <<< `find -type f -iname '*.md'` |
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
| while IFS= read -r line; do sed -i -E 's, width="800" style="border:1px solid black;",,g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's, style="border:1px solid black;",,g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's,<img cloudinary="ijortengab\.id/(.*)" alt="(.*)">,!\[\2\]\(/images/\1\),g' "$line"; done <<< `find -type f -iname '*.md'` | |
| while IFS= read -r line; do sed -i -E 's,<img cloudinary="ijortengab\.id/(.*)">,!\[\1\]\(/images/\1\),g' "$line"; done <<< `find -type f -iname '*.md'` |
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") |
NewerOlder