An interesting blog post about nice-to-have features on blogs.
- side notes
- ToC
- dialogues
- page progress
and some others.
An interesting blog post about nice-to-have features on blogs.
and some others.
A blog post by Sam Curry detailing his discovery and investigation into how his model was hacked.
Lots of interesting posts on his blog.
A blog post by Patrick McKenzie about careers, life choices, and running a business.
A letter written by Richard Feynmann to his wife in 1946, 16 months after she died from Tuberculosis. He sealed it in an envelope which was only opened after his death in 1988.
A blog post discussing building software in the context of:
The most important goal in designing software is usability
"When you're designing a piece of software, the single most important thing to design for is understandability. Security, performance, and correctness are all important, but they come after understandability."
A blog post about standardizing technology and tooling.
Mostly standardize, exploration should drive order of magnitude improvement, and limit concurrent explorations.
A moving article by someone who volunteered at a hospice.
Another excellent and interesting blog post from Simon Willison about OpenAI's DALL-E 3 text to image AI.
Another blog post from collabfund with some anecdotes about irrational actions.
Similar events happen will occur, but don't count on them.
Understand that luck plays a role, and that more things can happen than will happen.
"Americans are no wiser than the Europeans who saw democracy yield to fascism, Nazism, or communism..."
On tyranny: link
"Being free means that you actually end up in situations where you won't actually feel like you have a whole bunch of options."
an idea that costs you nothing is worth exactly what you paid for it. ... good ideas "aren't real unless you're willing to do some little thing to act on them".
- Conversation with Timothy Snyder
A blog post on ofdollarsanddata.
Morgan Housel has a book on that list, which given how many of his blog posts I've linked to here, I'll be sure to read.
A super blog post written by a developer describing how they've setup and modified their keyboard shortcuts.
Misonne would often photograph things that were strongly illuminated from behind, producing a halo effect. He would also retouch the lighting effects in his photographs, experimenting with and using many techniques, such as the Fresson process and later the bromoil and mediobrome processes. He also invented the "flou-net" and "photo-dessin" processes.
A paper describing what the unrestricted GPT-4 can do.
Come back to this
Can do:
Can't do:
An interesting article in the generalist. Come back to this.
An article on youngmoney.co about types of wealth:
An article on youngmoney.co about missed opportunities and perceiving risk.
Why do we do this? Because it's too risky to do anything else, obviously. Of course, we never stop to think about what that "risk" is, because we don't know what that risk is. Deviating from well-trodden ground feels uncomfortable. It feels wrong. Therefore it must be risky.
I'm going to let you in on a secret: that "risk" that you are avoiding? It isn't actually risk. It's simply the unknown.
The real risk is starving your life of experiences to pursue some arbitrary path that you might not even care about in the first place.
I want to travel locally and make time to look at the cities and villages around me, and the people living in them. It has been too long since I took the time to think about seeing.
A Decrypt article reporting on research by Glassnode.
A blog post by Stephen Bailey articulating ideas I've thought about but never seen anyone else consider;
The active and violent spirit of the postdoc is a critical difference in the ways that early- and mid-career professionals grow in their craft.
It takes animus to push conversations out from the boring straits of explanation and pedantry and into the frothy, conflicting waves of exploration and world expansion. It takes a bit of pirate swagger. It takes a separation of the world into mateys and landlubbers.
After the beginner’s scaffolding of skills, what matters is the mechanism for deciding what’s next. That’s where opinion and aversion — not reason! — comes in.
And therefore opinionated ↩
A blog post about engineering strategy. This author has written a lot about software engineering management - my blog has links to some of his other articles.
The author has written a book "Staff Engineer", and his site seems to be the best online resource for information about engineering management and how to be specifically a senior software engineer.
A blog post looking at the childhoods of exceptional people.
A lot of it does not require sacrifices, though. It is just a way of viewing children: as capable of competence, as craving meaningful work, as worthy to be included in serious discussions.
A blog post by a runner to her 15 year old self.
A blog post by the valuable.dev exploring creativity, fear, failure and learning.
Anything we try to create in this world will be a mix of fear, fun, and pain. The result will be either success, or regret.
Come back to this.
The YAML document from hell is a great blog post demonstrating several pitfalls and gotchas of the YAML standard.
Also, there is this website documenting the different ways of writing multiline strings.
All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost.
From the ashes a fire shall be woken,
A light from the shadows shall spring;
Renewed shall be blade that was broken,
The crownless again shall be king.
J.R.R. Tolkien
A short list (inspired by another list) of examples of businesses that achieved very high valuations with very small teams.
Fan Ho (Chinese: 何藩; Jyutping: ho4faan4; 8 October 1931 – 19 June 2016) was a Chinese photographer, film director, and actor. From 1956, he won over 280 awards from international exhibitions and competitions worldwide for his photography
Robert Doisneau (French: [ʁɔbɛʁ dwano]; 14 April 1912 – 1 April 1994)[1] was a French photographer. From the 1930s, he photographed the streets of Paris. He was a champion of humanist photography and with Henri Cartier-Bresson a pioneer of photojournalism.
Doisneau is known for his 1950 image Le baiser de l'hôtel de khDoisneau is known for his 1950 image Le baiser de l'hôtel de ville (The Kiss by the City Hall), a photograph of a couple kissing on a busy Parisian street. He was appointed a Chevalier (Knight) of the Legion of Honour in 1984 by then French president, François Mitterrand.
A personal essay in the Financial Times by Xenia Minder.
Very sad, very strong.
A super blog post about how to write secure code.
An article in Outside Magazine about the health benefits of sunshine.
A handy site with lots of tmux info, including how to open a pop-up window to fzf another session.
A blog post with some new command line tools.
An article in the Atlantic.
A personal blog with some notes on books that look interesting. I'd like to try reading these over the summer.
A HN article about a personal website that has been made in the style of a Pokemon game. Super cool.
A data driven article comparing equity and salaries broken down by geography, investment stage and number of founders.
A list of sites that help children learn to code.
An excellent article about the state of web3 and NFTs.
Corey Zue is an indie maker who made Pegasus (Django boilerplate SaaS) and a wedding place-cards product.
This is a link to his open startup metrics page.
Also check out this similar post which has similar links for solo SaaS founders.
A blog post about monetizing SaaS products.
An article suggesting best practices for adding JSON output to CLI apps, and mentioning why JSON output is a good idea.
I've been trying to replace ALE with CoC. It didn't work. Maybe I have unusually high fixing expectations, but ALE is more capable and easier to setup. So I'll be using CoC and ALE together, which feels messy.
pip install pep8 autopep8
<leader>fs
<leader>a
- a list of all the wrong things
vif
- select inside function
vam
- select method
<leader>ac
- see a box with options to fix imports or ignore file
Sort sessions alphabetically <prefix> s
then O
List of sessions: <prefix> s
Last session: <prefix> Z
Rename session: <prefix> $
Rename window: <prefix> ,
Previous session: <prefix> (
For last session I used the following key bind:
bind Z switch-client -l
For example, your laptop could be backed up to a NAS, a server, and glacier storage. Or 2 NAS and 1 archival cloud storage.
wip
The client thinks that the reverse proxy is the end-point server.
The server thinks that the client is the proxy.
Source: cloudflare
ssh
into the server then Unison should work.To sync the contents of dir b
into dir a
:
unison -batch -color true <dir-a> ssh://<user>@a<host>/<dir-b>
wget
chmod +x <file>
/usr/local/bin
unison -doc tutorial
> remote method
> remote shell method
You can also use unison to sync files on the same computer.
Recently I needed to work on a codebase that was on a remote machine whilst still using my local workflow and developer tools.
Vim's built in scp://
functionality isn't versatile enough - i wanted to use fzf.vim
to search for text across the code base. This led me to rsync
, sshfs
, and eventually unison
.
Being content with what you already have. You don't need more stuff, or new stuff, just because it exists. You're being marketed at, or marked.
Do you need it or do you want it? Need is finite, want is infinite.
Beauty in imperfection. As things begin to wear, they develop some character that can make them nicer than something that is fresh. It's the opposite of new shiny thing syndrome.
An object has more than one purpose. Repurposing, inventing, adapting, etc is interesting and a mini achievement that can be celebrated.
In case you want to reset your virtualenv:
pip freeze | xargs pip uninstall -y
An introductory article with examples from Smashing Magazine that introduces and explains what alpine.js is and how it is different to jQuery and vue.js.
source
and exec
are both built-ins.
source
evaluates or runs the content of a file. For example, if you source ~/.zshrc
you apply the content of the file to the currently running Zsh process. You can source any valid Zsh code.
exec
replaces the current shell process with another process. Your terminal (tty
) session is running a shell. Replace it with another shell without launching another tty. It could be the same shell with different settings or flags.
The tty
(teletypewriter) command prints the name of the terminal you're using.
Chezmoi is a dotfiles manager.
chezmoi diff
- see the difference between the current state of your local dotfiles compared against the checked-in versions.cm aa
- to update chezmoi with all your local changes.alias -g aa="status | cut -c 4- | xargs -I % -p sh -c 'chezmoi add ~/%'"
In zsh you can suspend a command whilst typing it.
This clears the current line, lets you run another command, and then when it finishes the original unfinished text is put back.
This is useful if whilst typing a command you realise you need to run another command first, like:
ls
to check the name for an argument.man
or tldr
for a command flag.Zsh has built-in functions push-line
and push-input
.
Yesterday the YouTube algorithm suggested a video by Daily Stoic.
I'm really enjoying math explainers lately, on YouTube there's 3blue1brown and Veritsasium, and for text I've enjoyed a couple of Matt Ferraro's blog posts.
Check out What is the inverse of a vector? and Poisson's Equation is the Most Powerful Tool not yet in your Toolbox.
This is a great explanation of the geometric reasoning for the solution to quadratics and cubics, which then goes on to introduce imaginary numbers.
Interesting article about writing down a list of manual steps for tasks that can't be automated. A do-nothing script can take some of the toil out of a manual slog.
Even though the script doesn't do anything other than display text on a screen (the instructions to complete the task) it's still helpful, because:
It doesn't reduce manual effort. It does reduce toil.
Jack Daniels' book about running has a training plan that seems to be highly regarded.
Brutal loneliness.
Script to output colors in a buffer:
:so $VIMRUNTIME/syntax/colortest.vim
SO question with reference image.
A project to demonstrate an offline, fast, point-of-sale device to allow merchants and customers to make fast cheap transactions on the lightning network.
Also lnbits
Introducing #LNURLPoS!
— Ben Arc 🏴✊⚡️ (@arcbtc) September 27, 2021
Completely OFFLINE <$10 #bitcoin LN Point-of-Sale.
Video tut coming soon, workshops at #hccp21 and @AdoptingBTC
Check out the repo! https://t.co/JFCKocDfFO
(watch the @lnbits wallet in the background when the transaction is made 🤩) pic.twitter.com/fVbMkP1kJT
This article is a fairly practical introduction to the GNU make
tool.
It's not the article I was looking for though, so I might swap it out if I find a better one.
A blog post with a checklist of steps to take and questions to ask when investigating a performance issue on a Linux server.
An article from the Farnham Street blog.
gcloud config set account [email protected]
gcloud auth list
Google Pub/Sub has client libraries in all the usual languages. You can also construct the API calls yourself. This is a link to the API documentation.
If I were to use a JavaScript beacon to push a message to a topic, my web analytics engine (a collection of cloud functions) could subscribe to the topic.
This would have the advantage that if the site were flooded with traffic and the maximum number of function instances wasn't enough to handle all the events, then none of the page views (or other events) would be lost because Pub/Sub guarantees delivery and would keep trying to deliver the message for up to 7 days.
Using the beacon to trigger the cloud functions directly wouldn't work at scale, because once the maximum number of instances are being triggered as frequently as the function takes to run, the endpoint would become unresponsive. There is no caching layer.
However, the site isn't being flooded with traffic, and I have better things to do than fix stuff that isn't broken.
Documentation explaining how to set CORS and TTL for a storage bucket.
Create a JSON file with something like this:
[
{
"origin": ["..."],
"method": ["GET", "PUT"],
"responseHeader": ["Content-Type"],
"maxAgeSeconds": 300
}
]
gsutil cors set cors.json gs://johnmathews.is
gsutil cors get gs://johnmathews.is | jq
A twitter thread showing how a business started creating handwritten notes to customers using a plotter, and how they scaled up and further automated the process.
It would be cool to create something like this for western Europe. Handwrytten.com seems to be the main commercial implementation of this idea in NA. Competitors.
I still think it would be fun to make a simple photo printing service. Share a photo in a WhatsApp message and its printed and delivered.
A ledger (what's a ledger? It's a webpage) from the "Center For Humane Technology" showing some of the dangers of social media.
The "Do unto others" section is outstanding. It describes the views of some tech company leaders, including how they limit usage of devices and social media for themselves and their kids.
If youth is wasted on the young, then life is wasted on the living.
This article about how people become slaves is very uncomfortable reading.
It puts a very different perspective on my life, ambitions and perceived risks.
Google Cloud Platform have introduced a "minimum instances" features in the Cloud Functions product.
If you have a function using 128MB of memory (the smallest option), it will cost a minimum €0.061 per day (€1.86 per month) to run 1 minimum instance.
sudo nmap -sP 192.168.1.1/24 | grep "Nmap"
Thanks to Jeff Geerling (again) I found this nifty command to see what devices are connected on a local network.
Found in this article about setting up a pi-hole.
Your relationships will come to define your life more than anything else.
A blog post about someone who read their dad's journal after he died. Its about regret, grief, and struggles against internal contradictions. Its about the tangible consequences of intangible relationships.
The comments are also significant.
Miller is like awk, sed, cut, join, and sort for data formats such as CSV, TSV, tabular JSON and positionally-indexed.
Try this if you're operating on JSON of CSV data, and you want to use column names instead of column numbers.
Blog post showing how you can set git variables depending on where you are in a directory tree.
It hinges on conditional includes.
Organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations - Melvin Conway
In reverse:
If the architecture of the system and the architecture of the organization are at odds, the architecture of the organization wins - Ruth Malan
A blog post about how someone compromised a group of web apps.
It lists a series of technologies and techniques that the author uses as they progress their investigation.
These would make a useful list of things to know in order to build safe web-apps and not repeat the mistakes of the unfortunate target company.
The toughness of elite ultra-runners is very underrated.
Just one of the problems Sabrina Stanley encountered would be enough to justify dropping out.
Part 1 of an incredible interview and tour of starbase with Elon Musk
¯\_(ツ)_/¯
Being very good at one particular thing can make it easy to be bad at normal things:
A repo of curious syntax features.
"Without psychological safety, respect, and trust, none of the following is possible"
"The best ways to work are collaborative. Negotiation is not collaboration. Isolated individuals making heroic efforts are never as effective as collaborative groups. We get the best results when customers, business people, and developers literally work together."
Zwischenzugs blog post arguing that to achieve a significant change in an organisation you need need to:
The five whys approach to problem solving
"Consider a deeper structural cause of cultural problems in change management: how money flows through the organisation."
"If you want to transform IT in an enterprise, start with finance. If you can crack that, you've a chance to succeed with sec and controls functions. If you don’t know why it’s important to start with finance, you’ll definitely fail "
Hilarious article from UI Collecitve showing the results of a competition to design the worst possible volume control interface. 😂 😂 😂
Yesterday my daughter asked me to write a page in her Freundebuch.
Of all tyrannies, a tyranny sincerely exercised for the good of its victims may be the most oppressive. It would be better to live under robber barons than under omnipotent moral busybodies.
The robber baron's cruelty may sometimes sleep, his cupidity may at some point be satiated; but those who torment us for our own good will torment us without end for they do so with the approval of their own conscience. They may be more likely to go to Heaven yet at the same time likelier to make a Hell of earth.
This very kindness stings with intolerable insult. To be "cured" against one's will and cured of states which we may not regard as disease is to be put on a level of those who have not yet reached the age of reason or those who never will; to be classed with infants, imbeciles, and domestic animals.
- C. S. Lewis
Blog post about how to make it easier to upgrade a cryptographic or hashing library.
Django encodes passwords for database storage like this:
<algorithm>$<iterations>$<salt>$<hash>
Interestingly, Giovanni Collazo emphasises that we should design systems for change, which initially seems pretty close to contradicting YAGNI, but the answer lies in the context.
Lessons of a startup engineer is a great blog post from Todd Wolfson. So great that I might write notes on it like I would a book.
A great article introducing and showing the relevance of Poisson's Equation.
His works in English and Latin.
"I have learnt that failure is my greatest teacher"
- Georges St-Pierre
Contains too much conjecture at the start, but becomes more substantial.
At high levels of competition the difference between "good" and "great" is partly determined by how much pain you are willing to experience.
There are great benefits from training in a secondary discipline.
Alfie Solomons - Where the light comes in. Scenes showing the character of Alfie Solomons from Peaky Blinders.
Rabbits, fluid convection, the Mandelbrot set and lots of others things too. Also known as bifurcation theory.
The video shows how the Feigenbaum Constant is defined. It's a fundamental constant I hadn't come across before - 4.6692..
"An Apple onion router. The routing uses two hops; Apple provides the first, and independent third parties (not yet specified) provide the second."
"In one move, Apple has taken onion routing from a specialized tool for hackers to something that will be in daily use."
Cool Python module to handle terminal output with debugging and logging features. It can even record stack trace errors to html.
An amateur practices until they can play it correctly, a professional practices until they can't play it incorrectly.
s
followed by 2 chars.S
goes backwards.F
, f
, T
, and t
are enabled to work across lines.<C-O>
;
or ,
to go to next/previous highlighted text.5sxy
searches for the next instance of xy
within 5 lines.3dzqt
delete up to the third instance of qt
.A basic statement that is assumed to be true. E.g: "A straight line can be drawn between any two points"
Hedgehogs know one big thing, Foxes know many things.
A classification system or mental model for writers and thinkers.
Key commands
git lfs install
(also uninstall)git lfs track "**/*.mp4"
git lfs ls-files
git lfs status
track
just updates the .gitattributes
file.
Commit the .gitattributes file with the tracking configuration before committing the large files.
status
or ls-files
should show the large files in question before you push the commit that starts tracking the large files.
Blog post demonstrating how to split a .bashrc
file into "submodules" and keep it maintainable.
BASHRC_D=~/.config/bashrc.d
[[ -r ${BASHRC_D}/bootstrap ]] && . ${BASHRC_D}/bootstrap
for file in ${BASHRC_D}/*.sh; do
[[ -r $file ]] && . $file
done
unset file
The exhausted moments after running for almost 60 hours through impassable terrain:
An essay called A project of ones own by Paul Graham.
[s
or ]s
→ go to next/previous bad wordz=
→ list of suggestionszg
→ add word to good word listzug
→ remove word from good word listzw
→ add word to bad word listzuw
→ remove word from bad word listgrep -inr --include package.json \
'shortcut": {' . -A 3
--include
flag that does the important part.-i
→ case insensitive-n
→ print line number-r
→ recursive from starting page.
→ start in current directory-A 3
→ print the 3 lines below the found line:map
→ show a list of the current keyboard mappings for normal, visual, select and operator pending modes.
:map!
→ show a list of the current keyboard mappings for insert and command-line mode
Top put all the mappings into a convenient text file:
:redir! > vim_maps.txt
:map
:map!
:redir END
"Without training, they lacked knowledge. Without knowledge, they lacked confidence. Without confidence, they lacked victory.”
- Julius Caesar
I know about ImprovMX, which used to be great because you could do a lot for free, but now you only get 1 domain for free.
ForwardEmail are 3 times cheaper than ImprovMX, and I have 2 domains forwarding email. It's not particularly private, but I can send and recieve from a domain, for free.
A snippet detailing how to use nested auto commands to apply custom modifications when a colorscheme is loaded. Perhaps this will stop me :e
-ing so frequently.
A useful collection of gists by Romain Lafourcade
A gist about netrw
.
See where an option was set in vim using the following command:
:verbose set textwidth?
????
→ 4 chars
*
→ any number of chars
[:upper:]
⇔ [A-Z]
same for [:lower:]
and [:digit:]
[:alpha:]
⇔ [a-zA-Z]
[:alnum:]
⇔ [a-zA-Z0-9]
ls -l [a-d]
→ part of a range
^ and $ works like in regex
la a*.{doc,docx}
→ OR
ls a*.(doc|docx)
→ OR
Create a custom command and function to create a new file in vim.
command! -nargs=1 Ms call s:NewFile(<q-args>)`
function! s:NewFile(fp)
echom a:fp
execute "e " . "~/foo/bar/" . a:fp . ".ext"
endfunction
Useful help:
:h %:h
→ filename modifiers:h expand()
→ expand wildcards, including filename modifiers<C-h>
- same as backspace<C-w>
- delete previous word<C-u>
- delete everything before cursor (on same row)<C-d>
or <C-t>
- (un)indent a row<C-e>
- delete next word (create a mapping in vimrc)If you want to alias a bunch of arguments for a command, use global aliases:
alias -g foo="some complicated options"
grep some complicated options
becomes: grep foo
It's annoying when you delete something and overwrite your yanked text.
Use numbered registers! "0
to "9
"0
contains the most recent yank."1
contains the most recent deleted text"0p
- paste the most recent yank, even if you deleted something after yanking itChezmoi is a great tool for managing dotfiles. This is a shortcut to update the source state based on local changes.
chezmoi status | cut -c 4- | xargs -I % -p sh -c 'chezmoi add ~/%'
“It enhances your memory and makes you more creative. It makes you look more attractive. It keeps you slim and lowers food cravings. It protects you from cancer and dementia. It wards off colds and the flu. It lowers your risk of heart attacks and stroke, not to mention diabetes. You’ll even feel happier, less depressed, and less anxious.”
Why We Sleep by Dr. Matt Walker
How to write robust bash scripts:
An often recommended blog post by Kaleigh Moore about writing a good about page.
/etc
(etsy) → "etcetera" or "editable text config" → a place to put config files.
Originally, the root directory had /boot
for booting, /dev
for devices... One dir for each type of thing. But this put config in many places. so etc/
became convention
Blog post about browser/Web-app security, including:
From an Interview:
I don't want to claim that programming is an art, because it really is mostly just about 'good engineering'. I'm a big believer in Thomas Edison's 'one percent inspiration and ninety-nine percent perspiration' mantra. It's almost all about the little details and the everyday grunt-work.
But there is that occasional 'inspiration' part, that 'good taste' thing that is about more than just solving some problem - solving it cleanly and nicely and yes, even beautifully.
A RPC is when an executable causes a procedure (subroutine) to execute on another computer, It's coded as if it were a normal (local) subroutine. You don't explicitly code the details for the remote interaction. You write the same code whether the subroutine is local or remote.
Just found a really useful blog
Interesting discussion about the difference between builtins and executables,
Nice examples of using fzf
to improve workflows.
lsblk
is a command to get info about connected devices.
Used when attaching drives.
A console based file manager with vi key bindings.
Install it with brew install ranger
Launch it with ranger
This is a great article about using regular expressions in Vim:
where <executable>
See a list of all builtin commands man where
Make aliased files the real file
for f in $(find . -type l -maxdepth 1);
do cp --remove-destination $(readlink $f) $f;
done;
swap-window -s 3 -t 1
Save (write) a (read only) Vim file with sudo when you opened it without sudo-ing:
:w !sudo tee % > /dev/null
Broot is a tool that shows the contents of a directory on one screen, even its got lots of files or sub-directories.
I added keyboard navigation to my blog and it works really well. Now I find myself trying to use the same shortcuts on other sites.
I should see if I can use GitHub actions to generate html from markdown and run some shell and python scripts.
It's more socially acceptable to make mistakes and errors of omission than commission.
There is a similar tool, with a list of other similar tools here
An example of a safe, good, robust bash file skeleton.
I was running a binary in Debian that was complaining about an environment variable not existing. I moved the binary into a $PATH directory and logged in as a sudo user. Why did this solve the problem?
As a hacker, or creator, or whatever the best label is, I always want to create something (usually code) and have it finished.
But a strange creativity and productivity boost comes from dabbling, dipping in and out.
I think that if the technical challenges aren't too hard, then the main criteria for success is creativity.
Creativity needs time away from the project, and sleep, to bubble up and let ideas grow.
Ultimately, the most successful path is usually the most interesting, because success has more consequences than failure. "Interesting" requires elements of novelty and surprise, and without creativity these elements can't flourish. 3/n
Dabbling results in more creativity than 6+ hours of strenuous work, and is more likely to give you satisfying results.
bar << foo
bar will stop reading input when it reached "foo".
bar <<< "foo"
foo is all the input. bar wont run interactively.
bar < <(foo:list)
process subscription. Kind of like piping in the output of multiple commands.
console.info(`${JSON.stringify(foo, null, 2)}`);
analystsnow.com looks like a really useful business.
Frantic distraction via productive procrastination is exhausting, and useful.
<C-w>x
- swap buffers, but keep arrangement the same
<C-w>H
- make the current split cover the left of the screen.
J, K, L covers the bottom, top, right of the screen
A guide about writing plugins for Pelican.
Thanks @geographeur
I tried to read and write the same file in a pipeline, and got caught out by a race condition (why is the file empty?!). Do this instead:
some_script < file > smscrpt.$$ \
&& mv smscrpt.$$ file || rm smscrpt.$$
||
removes the temporary file if it errors.
$$
is the process ID and ensures that you always have a unique temporary file name.
jj
- A stream editorjq
- A json processorpython -m json.tool
I like jq
for pretty printing JSON output, jj
for making JSON pretty or condensed.
This was really useful when optimizing the search index for this blog.
docker run -d ...
docker logs -f <ID>
docker run -it ...
docker run -itd
docker container attach <ID>
<C-p><C-q> -> detach from container interactively
Probably it's one you just curl
-ed
curl -sSfL https://example.com/install.sh | sh -s
Split long strings (or command outputs) onto multiple lines Find and replace a particular char (maybe :
) with a \n
.
... | tr ':' '\n'
... | sed 's/:/\n/g'
Teaching my kids about money and work is having an effect.
Yesterday, my daughter made a painting for me and asked my to buy it using pretend money.
sudo groupadd docker # make the group
sudo gpasswd -a $USER docker # add $USER to the docker group
newgrp docker # activate the changes
If you're cat
-ing a file and the bash prompt doesn't start on a new line (cos the file you displayed using cat doesn't end with a new line char) the following will fix it:
cat <filename> ; echo
adduser -m <username>
usermod -aG sudo <username>
CentOS:
adduser -m <username>
passwd <username>
usermod -aG wheel <username>
wheel
is a usergroup with sudo permissions
df -h
Show disk space
du -hs .
See how big the current dir is
Cloning large repos, or repos with large files in them, doesn't work with git clone ...
you need to use git lfs clone ...
So why is git lfs clone
deprecated? What's the replacement?
Use nohup
to keep a curl process running even when the terminal (tty?) session autocloses at 3am.
You can group shells into groups:
ksh
- korn shell and zshellsh
- bourne shell and bash (the bourne again shell)Because
zsh
isn't a superset of bash.bash
is a superset of the bourne shell.Two nights ago, I dreamt I was experimenting with Emacs..