diff options
| author | EuAndreh <eu@euandre.org> | 2020-08-12 06:34:38 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2020-08-12 06:56:04 -0300 |
| commit | 191728a2cac217e96a7f1e4e9a4710606f6ad920 (patch) | |
| tree | bbcf9c17bb3bd462f8d1c41169d1122b08161d18 /t | |
| parent | assert-content.sh: Look at post refs too, not only pages (diff) | |
| download | euandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.gz euandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.xz | |
Add TILs section, with Atom support and i18n
- add i18n logic to support translated TIL entries and listing;
- make the website title less tied to a blog: "EuAndreh::blog" ->
<web>EuAndreh</web>;
- remove old Atom feed link aliases;
- remove feed.all.atom and it's link in the about page;
- create Atom feed for TIL entries;
- show blog and TIL Atom feed on their listing pages (index and tils-listing);
- add root alias: / -> /en/
- remove explicit list of feeds from $IGNORED_PAGES and use a '*.atom' glob
instead;
- also lint, assert-content and assert-unique-ref of TILs;
- fix wrong "post.date" in pastebin entry in site.json;
Diffstat (limited to '')
| -rw-r--r-- | til.md | 144 |
1 files changed, 3 insertions, 141 deletions
@@ -1,146 +1,8 @@ --- -layout: page -title: "TIL: Useful code snippets" +layout: tils-listing lang: en -ref: til +ref: tils --- - -### Bash variables - -```shell -$ which git -/run/current-system/sw/bin/git -$ readlink $(!!) -readlink $(which git) -/nix/store/5bgr1xpm4m0r72h9049jbbhagxdyrnyb-git-2.28.0/bin/git -``` - -### Git custom work-tree checkout - -```shell -git --work-tree=/path/to/outputdir checkout HEAD -- . -``` -### Search in Git - -Search log messages - -```shell -git log --grep='Build 0051' -``` - -Search content in git history - -```shell -git grep 'Build 0051' $(git rev-list --all) -``` -### Find broken symlinks - -```shell -find . -xtype l -``` - -### Kernel version -```shell -uname -r -``` -### Sending email through the command line - -```shell -mail eu@euandre.org -s "This is the subject" -aFrom:eu@euandre.org <<< 'This is the message' -``` - -### Git bisecting - -Automatic Git bisect - -```shell -git bisect start e1fd0a817d192c5a5df72dd7422e36558fa78e46 HEAD -git bisect run sh -c 'git clean -ffdx && ./bootstrap && ./configure --localstatedir=/var && make && git checkout' -``` - -### UNIX searching commands - -```shell -$ which gcc -$ locate signal.h -$ updatedb # add to cron? -``` - -### Guix contributing - -```shell -$ cd ~/dev/guix/guix/ -$ git clean -ffdx -$ guix environment guix # guix environment guix --ad-hoc help2man git strace -$ ./bootstrap -$ ./configure --localstatedir=/var -$ make -$ ./pre-inst-env guix describe -$ ./pre-inst-env guix show $PKG -$ ./pre-inst-env guix build $PKG -$ ./pre-inst-env guix lint $PKG -``` - -v2: -```shell -guix environment --pure guix --ad-hoc help2man git strace -- sh -c "./bootstrap && ./configure --localstatedir=/var && make" -``` - -v3: -```shell -$ guix environment --pure guix --ad-hoc help2man git stract -$ ./bootstrap -$ ./configure --localstatedir=/var -$ make -$ ./pre-inst-env guix build $PKG -$ ./pre-inst-env guix lint $PKG -$ ./pre-inst-env guix refresh --list-dependent $PKG -$ ./pre-inst-env guix build --rounds=2 $PKG -$ ./etc/ident-code.el $PKG -``` - -### git mail patches - -Check the [guix-devel thread][0] on -named "Re: [External] Re: New outreachy participant introduction". - -[0]: https://lists.gnu.org/archive/html/guix-devel/2019-10/msg00093.html - -### Flutter Dart `patchelf` - -```shell -patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) /home/andreh/dev/misc/flutter/bin/cache/dart-sdk/bin/dart -``` - -### builds.sr.ht environment variables - -[https://builds.sr.ht/~euandreh/job/68005](https://builds.sr.ht/~euandreh/job/68005). - -### `C-c M-m` in message-mode for creating `cut here` sections - -Or run the `scissors` function. - -### Software Recomendations StackExchange exists - -[https://softwarerecs.stackexchange.com/](https://softwarerecs.stackexchange.com/). - -### GPG key search - -```shell -gpg --search-key eu@euandre.org -``` - -### Git Annex wanted - -```shell -git annex wanted . 'exclude=Banshee/old-musics/* and exclude=attic/videos/* and exclude=Photos/*' -``` - -### Useful keybindings -- `SPC v` for region selection -- `SPC j s` to split sexp -- `mod-shift-space` reset layout - -## Acknowledgements +**T**oday **I** **L**earned: small entries of useful knowledge.</p> Shameless rip-off of [Anna e só](https://til.flourishing.stream/). |
