RadiantSecurity
Joined 7 years ago
Joined 7 years ago
All of these examples make sense in the context of your business, but in some environments these might be best practice ;)
I had a proof of concept, but hackernews doesn't support emojis :'(
I mapped 'cd' to 'c' in my bashrc, but while doing it I also mapped 'c' to execute 'ls' as the latter was basically muscle memory whenever I was using cd. The .bashrc function looks like this:
c() { builtin cd "$@" && ls; }
Highlights include:
- Bind C-c/C-v to Copy/Paste, bind C-g to sigterm (Note: Breaks docker interactive unless you mount bashrc into /etc/bashrc or similar!)
- Autorun tmux on SSH session
- Syntax/colour highlighting in zsh interactive, I think there's some diff/less/man magic in there too!
- Log all shell activity to .shell_logs (Be _super_ careful with this one, breaking it could prevent you opening an interactive shell
- Useful grep defaults, particularly relevant when using .shell_logs
Bashrc: https://gist.github.com/YoloClin/f4c82a6e693000a2da20e8029a4...
Zshrc: https://gist.github.com/YoloClin/ffd82f441d292ccc5f25c62a80c...
One thing I've lost love for is Powerline9k - Right-aligned data breaks copy/paste functionality, and patching fonts to get UI-arrows is fiddly for little functional value. If I ever need to fiddle with that stuff again, I'll configure a regular theme to do similar and go without the UI-arrow breaks.
I was considering hiding history-relevant log data (such as current system time) to behind a carriage return, something like PS1="$(date)\r$PS1".
I'm interested in hearing others' cool, non-standard hacks!
High-risk systems where a software bug could result in loss of life - aviation, submarine tech, defense, medical etc. Edit: This is for throwing exceptions on undefined behavior.
For unlimited threads I imagine scenarios exist particularly when scalable computing is so popular. Large high traffic web stores such as Amazon/Ebay, financial institutions, etc. Either way, the problem shouldn't be solved by an individual developer on a project making things up as they go - its a problem that probably needs to be defined at a framework layer, and discussed within the team of developers and requirements definers.