https://github.com/curusarn/til
today I learned - useful little commands, tools, facts
https://github.com/curusarn/til
bash-hacks oneliners tips tips-and-tricks
Last synced: about 1 month ago
JSON representation
today I learned - useful little commands, tools, facts
- Host: GitHub
- URL: https://github.com/curusarn/til
- Owner: curusarn
- Created: 2017-01-06T18:01:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-21T10:51:48.000Z (about 6 years ago)
- Last Synced: 2025-06-06T06:37:09.934Z (11 months ago)
- Topics: bash-hacks, oneliners, tips, tips-and-tricks
- Homepage: https://curusarn.github.io/til/
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Magic
Vector terminal screenshots: xterm > CTRL+left_mouse_button > svg screen dump
## Commands
`enca file.txt -L czech` - **detect encoding** of the *file.txt*, assume it's in *czech*.
`enca file.txt -L czech -x utf-8` - **detect and convert encoding** of the *file.txt* to *utf-8*, assume it's in *czech*.
`dd bs=4M if=os_img.iso of=/dev/sdb status=progress` - **create bootable usb drive** by writing *os_img.iso* to */dev/sdb*, show progress.
## Hacks
`vim -p $(grep -rl '#warn')` - **open all files containing** "*#warn*" as tabs in vim. search current directory recursively.
## Tools
https://lvc.github.io/pkgdiff/ - An awesome tool for visualizing changes in Linux software packages
## Websites
`curl `[http://wttr.in/](http://wttr.in/) - **get weather in ASCII** using your terminal or browser.
[https://github-forks.abumalick.com/](https://github-forks.abumalick.com/) - **find maintained forks** of your favorite GitHub repos.
## Facts
Python searches `/usr/local/lib/python...` before `/usr/lib/python...` - it had caused me problems.
`getopts` is a (POSIX) shell builtin that can parse simple arguments.
`getopt` is an external command (GNU and BSD variants) that can parse all kinds of arguments.
## Design
Many tools are bound to a single directory - this greatly simplifies usage of the tool by reducing the amount of possibilities. (`Makefile`, `Dockerfile`, `Rakefile`, etc.)