Miscellaneous tips, tricks, and thoughts from the author known as S0AndS0, source code that builds this site is available on
Awk Tips
Collection of Awk tips and tricks-
Floating point math
TLDRawk "BEGIN {print 10 * 4.2}"
-
Hello World in pure Awk
TLDR use shebang with-f
to make file an Awk script, eg.#!/usr/bin/awk -f
-
Pattern match against variable value
TLDR$0 ~ _variable_name { print }
Bash Tips
Collection of Bash tips and tricks-
Searching `man` via pager
TLDRman --pager='less --pattern=" -P pager"' man
-
Sanitize input string
TLDRprintf '%q\n' 'some th!ng n@$ty'
-
Log upgrades via `script` command
TLDRscript -ac "sudo apt-get upgrade" "$(date +'%Y-%m-%d')_sudo_apt-get_upgrade.script"
CSS Tips
Collection of CSS tips and tricks-
Text Shadow
TLDRtext-shadow: 0.05em 0.05em black, -0.05em -0.05em black
Docker Tips
Docker tutorials, guides, and/or quick tips-
Docker Compose NGINX Reverse Proxy cache Jekyll GitHub Metadata
Guide for caching GitHub API responses via NGINX reverse proxy for use with Jekyll GitHub Metadata plugin
Erlang Tips
Collection of Erlang tips and tricks-
Rebar3 umbrella soup
Supervising supervisors in an umbrella Rebar3 managed Erlang project
GitHub Actions Tips
Collection of GitHub Actions tips, tricks, and examples-
Node Inputs
-
Access GitHub Action inputs within JavaScript
TLDRprocess.env.INPUT_<NAME>
-
Set Node Modules path in Github Actions Dockerfile
TLDRENV NODE_PATH=/usr/local/lib/node_modules
Git Tips
Collection of Git tips and tricks-
Submodule example for GitHub Pages
How to borrow code from other repositories without a dedicated package manager -
Show and copy file between branches
TLDRgit show <REMOTE>/<BRANCH>:<FILE>
JavaScript Tips
Collection of JavaScript tips and tricks-
Example `console.table` usage
TLDRconsole.table({one: 'spam', two: 'Spam'})
-
Template Literals Now Supported In Node Js
-
This
Examples and a bit of history aboutthis
keyword in JavaScript
Linux Tricks
Collection of Linux tips and tricks-
Mount remote file-system over SSH
TLDR usesshfs
andfusermount
commands -
SSH Client Configurations
Advanced reusable configuration examples for SSH
Liquid Tips
Collection of Liquid tips and tricks-
Combining `capture` with `strip` example
TLDR{% capture workspace %} <!-- some content --> {% endcapture %} {% workspace | strip %}
Posts
Miscellaneous posts that don't fit a specific category or collectionProjects
Collection of Project announcements-
Paranoid Linux Adaptive IPTables Announcement
Announcement of new project which linksiptables
modification to SystemD service state -
RaspberryPi Curious YouTube Player Announcement
Announcement of new project which enables easy playback of YouTube videos via CLI -
Resume Builder
Rust Tips
Collection of Rust tips and tricks-
Nested PUSH/POP example for LaTeX (like) syntax
-
Parse object accessors recursively
Concise example of utilizing Pest grammars to recursively parse object accessors
Scammer Logs
Logs dumped from baiting scammers that make the mistake of reaching-out-
Cui from China
Wants to remote control PC to commit employment fraud via Upwork
Vim Tips
Collection of Vim tips and tricks-
RegExp match programming case conventions
TLDRecho matchstrlist(['userId'], '\v(\u+\l*)|(\l+)|(\d+)|(\D|\A)')
-
Make directory for current file
TLDR::command! Mkdir call mkdir(expand('%:h'), 'p')