Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
# Place this in your .bashrc | |
# Covers several corner cases such as nested apostrophes, history extraction in screens/subshells, Slack being down, etc. | |
# Strings to replace with your own credentials: | |
## {your email address} (1 instance) | |
## {slack webhook url} (1 instance) (see guide below) | |
## {your computer name} (2 instances) | |
# How to set up a Slack webhook (as of Jul 2019): | |
## Go here: https://api.slack.com/apps?new_app=1. | |
## Click “incoming webhooks” and turn the slider on |
Mosh is a great way to overcome lag and flakey connection issues when accessing remote terminals over SSH: https://mosh.org/
Unfortunately, there's still not a lot of clear documentation for "idiots" because a lot of the existing guides assume a) "it just works", or b) you're already skilled enough to set everything up from scratch (assumed knowledge/use cases).
One of the problems I ran into for quite a long time yesterday was getting the darn thing to connect to my Google Cloud instance. I kept running into the mosh: Nothing received from server on UDP port 60001. [To quit: Ctrl-^ .]
error (by the way - to quit, you have to press . after Ctrl-^ - it's not just Ctrl-^, there is a dot there too!)
FAQs and the like made vague spartan references to NATs, firewalls, iptables and the like and I tried out various commands and configurations on the se
bind -T root F12 \ | |
set prefix None \;\ | |
set key-table off \;\ | |
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\ | |
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\ | |
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\ | |
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ | |
refresh-client -S \;\ | |
bind -T off F12 \ |
# Set as the root configuration system wide | |
root = true | |
# Unix-style newlines with a new line ending every file | |
[*] | |
end_of_line = lf | |
# Remove trailing white spaces for every file type | |
trim_trailing_whitespace = true | |
# Matched different files |
def fspath(path): | |
'''https://www.python.org/dev/peps/pep-0519/#os''' | |
if isinstance(path, (str, bytes)): | |
return path | |
# Work from the object's type to match method resolution of other magic | |
# methods. | |
path_type = type(path) | |
try: | |
path = path_type.__fspath__(path) |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/