Live data from Hacker News

Ask HN: Can I see your cheatsheet?

news.ycombinator.com

101–110 of 173 posts

Re: Ask HN: Can I see your cheatsheet?

#101
https://github.com/Toreno96/dotfiles/blob/master/commands.tx...

Beware: I started this long before I became a fan of markdown, so the syntax of the whole file could seem as pretty weird, but it works for me. I mainly do `rg ~/commands.txt` in shell or `/` in vim when I need to find something in there.

There are also definitely too much commands dumped into the `Etc` section. I should reorganize this some day.

Re: Ask HN: Can I see your cheatsheet?

#102
post #60

I use my ebooks for reference: * GNU grep and ripgrep ( https://learnbyexample.github.io/learn_gnugrep_ripgrep/ ) * GNU sed ( https://learnbyexample.github.io/learn_gnused/ ) * GNU awk ( https://learnbyexample.github.io/learn_gnuawk/ ) * Ruby one-liners cookbook ( https://learnbyexample.github.io/learn_ruby_oneliners/ ) * Perl one-liners cookbook ( https://learnbyexample.github.io/learn_perl_oneliners/ ) * Command li…

I consider myself pretty experienced at shell-fu and capable of doing most things I set out to achieve in either bash scripts or fearless one-liners. However, my awk is rudimentary at best, I think mostly because it's such an unforgiving environment to experiment in. These books you've written are great for a bit of first principles insight and then quickly building up to functional usage. I will have no hesitation i…

The AWK Programming Language is great too. Every technical book should be written this way: describe feature, show feature through example, include cookbooks of useful commands.

https://ia903404.us.archive.org/0/items/pdfy-MgN0H1joIoDVoIC...

Re: Ask HN: Can I see your cheatsheet?

#103
One of the most useful cheat sheet utilities I've come across is cheat.sh: https://github.com/chubin/cheat.sh

If you don't have it installed it can easily be queried with curl from the command line like: `curl cheat.sh/sed`. The payload is colorized and gives a lot of examples of usage of the command. You can also query "cht.sh" to use fewer characters. There is actually a lot more advanced usage of the tool/service if you check out the README.

Apologies if this isn't what you're looking for.

Re: Ask HN: Can I see your cheatsheet?

#105
post #87

Earlier quoted context omitted.

With zsh you don't need to use find, fd, or any other external tool. zsh's built-in globbing features can be used instead. - Find all files modified in the last 90 minutes print -l **/*(mm-90) - Find all files and do something to each one print -l **/*(mm-90) | xargs ls -l - Find all files modified before 2 days ago print -l **/*(m+2) - Removing files older than 7 days zargs -- **/*(m+7) -- rm - Find all files modifi…

The zsh rm command doesn't with too many (say, 100 000) files, execve() fails with: Argument list too long. This works and it is relatively fast (runs rm in big batches): find ... | xargs -d '\n' rm --

Perl is also helpful to pipe to for any tool that outputs lists of files, like

  find . -type f -name '*foo' | perl -ne 'print;chomp;unlink'
And it has the same -0 switch as xargs to pair with find's -print0.

Not helpful in this case since you have other options, but maybe helpful for things like bulk touch, chmod, etc.

Re: Ask HN: Can I see your cheatsheet?

#106
post #93
post #86

Earlier quoted context omitted.

Your file just reminded me I have "broot" installed.. Its sad how I install all those things, forget about them the next day and cd/ls/vi like a caveman. The problem is much deeper than you think, OP...

Yep, this is my real problem. Install something that looks cool, then get wrapped up in the day-to-day and never make it muscle memory. Sounds like I should be focusing on "one new workflow thing a week" and make it a daily habit to practice, or something.

To be honest, its not like the current way is slower - its just not that "cool".

I seem to be using "zoxide" (ie "z prj") to jump to one of my projects after opening a terminal, and mostly stay on that folder for a few days.

Some other things I'll do in Finder, etc.

Re: Ask HN: Can I see your cheatsheet?

#107
For those with larger collections (I'm up to ~350 individual sheets), I'm interested to know you access (find/read/edit) the cheatsheets. My way:

(Mac Desktop): I use xbar [0] with a custom script to create a menubar nested dropdown of all of my cheatsheets. Selecting opens in typora [0] for reading/editing markdown.

(CLI): I use cheat [0] which consumes the same markdown cheatsheet content

    [0]: https://xbarapp.com
    [1]: https://typora.io
    [2]: https://github.com/cheat/cheat

Re: Ask HN: Can I see your cheatsheet?

#110

http://cht.sh/ - I use this a lot. It outputs a short summary of common commands for many cli tools. You can curl to it https://cht.sh/grep for example or install their cli client

Cheat Sheet Intro : https://cht.sh/:intro

Cheat Sheet Help : https://cht.sh/:help

Cheat Sheet List of topics : https://cht.sh/:list

Post reply on HN