
I've been writing TILs for 5 years - jbranchaud
https://github.com/jbranchaud/til/blob/master/README.md
======
weiming
TIL Alt-clicking in the Terminal prompt lets me move the cursor to that
position. How had I not discovered this over many years?

~~~
shrimp_emoji
Which terminal? In Linux, Alt+Left Click is the "move window around" idiom,
while Alt+Right Click is "resize window with the mouse".

~~~
tommyage
How can you know that this is a common idiom? Is there an (prob. GNU)-document
for these things? Two reasons I am asking: 1) I feel terrible reading this,
since my last post was preaching for XCFE for this exact functionality. 2) It
would be awesome to have these things bundled and discover many things which
are yet not discovered by me.

~~~
fiddlerwoaroof
The major Linux desktops have had this sort of thing for like 15 years. It’s
usually only discovered by people who obsessively tweak their settings,
though.

------
hhsuey
Forgive me for my ignorance, but I haven't contributed to open source much
yet. What is the reason for forking this repo. I see a lot of people have done
it. Wouldn't that be akin to cloning someone else's personal blog? I just
don't see the point of that.

~~~
baby
It's weird, but two potential reasons:

* in case the repo gets deleted, at least you still have a copy

* some github apps on tablet might give you an easier access to your own list of repos

~~~
EduardoBautista
Doesn't GitHub delete forks if the original is deleted? Of course, actually
cloning the fork onto your computer and pushing it to a new repository without
using GitHub's "fork" feature should get around this easily.

~~~
hhsuey
Deleting a private repository

When you delete a private repository, all of its private forks are also
deleted.

Deleting a public repository

When you delete a public repository, one of the existing public forks is
chosen to be the new parent repository. All other repositories are forked off
of this new parent and subsequent pull requests go to this new parent.

~~~
saagarjha
> When you delete a public repository, one of the existing public forks is
> chosen to be the new parent repository. All other repositories are forked
> off of this new parent and subsequent pull requests go to this new parent.

Yikes, is this a random process?

~~~
hhsuey
Apparently the oldest fork wins, or the author of the repo can decide.
[https://webapps.stackexchange.com/questions/86769/which-
fork...](https://webapps.stackexchange.com/questions/86769/which-fork-is-
marked-as-a-main-repository-when-the-original-one-is-deleted-in-gi)

------
saagarjha
> Chrome Supports Many Unix Keyboard Shortcuts

These are actually Emacs-style editing shortcuts that come are part of Cocoa's
text controls. If this _doesn 't_ work in an app on macOS, that app has broken
them or is trying (evidently poorly) to reimplement their own text editing
widget.

~~~
bdd
You can further Emacsify or customize text controls to your heart with a
`DefaultKeyBinding.dict` file.

This what I've been using for ~8 years. Apple removed a few functions here and
there but still plenty are available. Reference URL in the file comments.

    
    
        {
            /* Additional Emacs bindings:
             *
             * "<key combination>" = "functionName:";
             *
             * Key Modifiers:
             *   ^: ctrl
             *   ~: option
             *   $: shift
             *   @: command
             *
             * Instance Methods of "NSStandardKeyBindingResponding":
             * https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding
             *
             * Install under ~/Library/KeyBindings/DefaultKeyBinding.dict
             *
             * Download directly:
             * curl --create-dirs -o ~/Library/KeyBindings/DefaultKeyBinding.dict THIS_URL
             */
    
    
            "^l"  = "centerSelectionInVisibleArea:";
            "^/"  = "undo:";
            "^ "  = "setMark:";
    
            "~f" = "moveWordForward:";
            "~b" = "moveWordBackward:";
            "~<" = "moveToBeginningOfDocument:";
            "~>" = "moveToEndOfDocument:";
            "~v" = "pageUp:";
            "~d" = "deleteWordForward:";
            "^w" = "deleteWordBackward:";
            "~/" = "complete:";
            "~t" = "transposeWords:";
    
            "^x" = {
                "h"  = "selectAll:";
                "k"  = "performClose:";
                "^x" = "swapWithMark:";
                "^m" = "selectToMark:";
            };
        }

------
eatonphil
This is awesome! Twitter has been my goto for posting TILs for about as long.
Now I regret not collecting them in a more coherent format like this.

Sara Soueidan has a similar log oriented toward UI work:

[https://www.sarasoueidan.com/today-i-
learned/](https://www.sarasoueidan.com/today-i-learned/)

------
jbranchaud
Vim is by far my most TIL-ed topic. I recently started gathering a lot of that
learning into a screencast series:
[https://www.youtube.com/playlist?list=PL46-cKSxMYYCMpzXo6p0C...](https://www.youtube.com/playlist?list=PL46-cKSxMYYCMpzXo6p0Cof8hJInYgohU)

~~~
RMPR
Fun fact: I keep my Vim's TIL in a org file.

------
jblock
TIL that I'd been using items in this list for reference without realizing
that I had been working with Josh (OP) at my day-job the whole time!

------
theodorton
I've started collecting these myself and I try to summarize them every month.
I encourage everyone to do the same, it's a great way to build a reference of
stuff you learn that you can and reviewing them monthly makes it stick.

[https://theodorton.github.io/categories/til/](https://theodorton.github.io/categories/til/)

------
dchuk
Seems like a really simple web app concept someone should pursue. I feel like
being able to browse other people’s TILs and save them/search them would be a
really valuable thing.

EDIT: Just like this:
[https://til.hashrocket.com/](https://til.hashrocket.com/) but open to anyone
to sign up

~~~
hhsuey
Isn't that just a blog or a subreddit? And couldn't you find all the TIL blogs
by Googling for "TIL" or something?

~~~
dchuk
Would be closer to a subreddit I guess. But purpose built.

I think there’s lots of room for simple, purpose built web apps for stuff like
this.

~~~
hhsuey
True. I think that's the way the world is moving towards. I also see the 5000+
custom alarm clock apps out there as essentially forks of "deployed apps" for
just alarms. But that was already predated by the explosion of websites doing
the same XYZ thing (calorie trackers, photo storing apps, etc...) specifically
before the mobile era. I think we're just seeing the same with the open source
world as we've seen occur in more mature worlds.

------
Kagerjay
ive been doing this mostly on stackoverflow (where I answer my own question,
or answer questions to something I couldn't find an answer too). It does take
a bit longer than a repo where I just dump information, so I might try that
instead

My thought process is I'll google something and find something I wrote

There's also the bonus that you might get an expert answering your topic

EDIT: related story - I wrote an answer to a question about programming a
financial calculator, and one of my dev friends had the same exact
problem/found my solution the next day on stackoverflow

~~~
lostphilosopher
I have at least two things I consistently forget, and then relearn from my own
Stackoverflow answer. Comes up rarely enough that I chuckle at myself
everytime it happens. :-)

~~~
charlieflowers
The time for concern is when you find yourself asking, "WTF was that idiot
talking about?"

~~~
Kagerjay
* reads answer

[wow whoever wrote this was an idio... oh nevermind ^I'll just walk out now]

------
layoutIfNeeded
“On Mac, you can insert a non-breaking space character by hitting option-
space.”

Does anyone know how to turn this OFF? I accidentally type non-breaking spaces
in the terminal all the time and then have to meticulously try re-entering
each space from the end backwards until bash finally groks it...

~~~
nchelluri
[https://superuser.com/questions/78245/how-to-disable-the-
opt...](https://superuser.com/questions/78245/how-to-disable-the-option-space-
key-combination-for-non-breaking-spaces)

------
laddng
The VIM ones are my favorite - I'm always blown away with the simple keyboard
shortcuts that could have saved me hours had I known them 2 years ago.

TIL just typing "=" in Vim fixes all my indentation

Just subscribed to his newsletter so I can get these and not forget about this
cool repo!

~~~
IngoBlechschmid
The absolute best Vim command of all times is "ciw", or its variants "ci(",
"cip", ... You use this command when your cursor is in the middle of a word
(or parenthetical expression or paragraph or ...) and you want to replace that
word by a new one.

Maybe it's too well-known, but this command changed my life and I haven't
found in the linked list of TILs.

~~~
RMPR
I got that one from Drew Neil's book: Practical Vim

------
palijer
Reading through theses makes me wish I started this 5 years ago.

Guess I better start today!

~~~
jbranchaud
No better time than today to start building your own learning machine

[https://dev.to/jbranchaud/how-i-built-a-learning-
machine-45k...](https://dev.to/jbranchaud/how-i-built-a-learning-machine-45k9)

------
LeonB
I was inspired by Josh’s TIL previously and have been storing TILs at
[https://TIL.secretGeek.net](https://TIL.secretGeek.net) for years now too.

Just last night I rebuilt the site using a new static site generator I built
for it (called Clowncar) so I can cut gitbook out of my life.

------
einpoklum
Suggestion: If you have an especially good TIL about programming, look for an
appropriate public forum to post it.

------
mkchoi212
TIL macOS doesn't ship with `ack`. Found this out when trying the first thing
on the list `ack --bar`.

:(

~~~
sdenton4
Indeed... the MacOS command line tools often are missing or have some
different defaults and hotkeys (I'm looking at you, 'top') than the versions
I'm used to on my linux systems, which, sure, ecosystem diversity is cool and
all, but... Every time I try to rearrange the processor usage in TOP, I open
it up and think 'IT'S A TRAP!'

(admittedly, this was all just an attempt at making a sufficiently substantive
comment so I could make the joke about 'ack --bar')

~~~
oneplane
I think top in macOS is the BSD version where top in most linux distributions
is the GNU version. Same with tar.

------
oneplane
This is great. I've been collecting 'things' I learned and links to pages,
like a reading list etc. but none of that sticks out long term because the
resources might move, the data might not be searchable or the thing you wanted
to get out of a larger article is actually much smaller than the 20 pages it
came with. And then when you collect links and a reading list you end up not
really going back to it anyway.

This approach makes it much easier to just add the thing you actually wanted
to learn and learned in a small concise way with a reference back to where you
found it. So simple, yet as so many others I hadn't thought of it.

~~~
hhsuey
Why would you need to create notes and go back to it though? Isn't searching
for it much faster? Say you learned a nifty hotkey to backup text using a
shortcut on OSX (or whatever). Why not simply search "hotkey backup osx"? And
say that page you found it on shows up, but like you said, it's very long text
page. Then just just bring up the search-in-page feature in your browser, and
you're there!

~~~
oneplane
Because sometimes you find an article on hacker news that you didn't search
for but did stumble upon. Then you can't search for it because you weren't
searching for it in the first place.

------
kbr2000
Ha, you got me confused there for a bit, because of:
[https://wiki.c2.com/?ThreadedInterpretiveLanguage](https://wiki.c2.com/?ThreadedInterpretiveLanguage)

Anyway, thanks for sharing your tips!

~~~
mmphosis
I am still confused. Does TIL stand for Technical Information Library?

~~~
smitty1e
Today I Learned.

~~~
mmphosis
Yes, I did.

------
superasn
In a similar fashion I've been working on a snippet library for php and js,
though it's definitely not this frequent or intentional.

It's quite useful when I stumble upon things like how do I format this date,
or match balanced brackets in a string.

Battle tested code ready for my taking. Quite useful when I'm in a hurry! Do
you guys do this too?

------
dotmanish
In case folks are interested in other "non-tech" TILs, I occasionally visit
this blog to see what's been added recently -
[https://alearningaday.blog/](https://alearningaday.blog/) \- by a Product
Manager who currently works at LinkedIn.

------
ramshandilya
This is amazing. Curious how you search or go back to refer them? Have you
considered porting this to a doc generator like
mdBook([https://github.com/rust-lang/mdBook](https://github.com/rust-
lang/mdBook)).

~~~
jbranchaud
I usually remember when I've written on something even if I've forgotten the
details. I tend to be able to do a Cmd-f search of the README for a keyword to
turn up what I'm looking for.

All that said, I've been contemplating moving all of this into a Gatsby-
powered site with either a custom search backend or Algolia to make it all a
bit more accessible.

~~~
ramshandilya
Got it. I've been trying to solve a similar problem as well. I also stumbled
upon this Gatsby theme for such a scenario
([https://github.com/aengusmcmillin/gatsby-theme-
brain](https://github.com/aengusmcmillin/gatsby-theme-brain)). It's inspired
from Roam Research's bidirectional links to notes.

------
alphachloride
A lot of the TILs could be put in a single readme instead of a file of their
own.

~~~
closed
I agree there are ways to organize this that would benefit outside readers,
but am guessing the simple, consistent structure probably helped the author
get to 5 years of TILs!

It's interesting they chose to alphabetize and start many entries w/ verbs.

------
littke
I am actually building a site specifically for this use case:

[https://todayilearned.co](https://todayilearned.co)

It allows both private and shared insights, so people can learn together.
Check it out

------
simonw
This inspired me to start doing this myself. I made a start here:
[https://github.com/simonw/til](https://github.com/simonw/til)

------
simonw
I really like this format. It's an interesting mid-point between a tweet and a
blog, but optimized for "evergreen" content as opposed to content where the
date is key.

------
cellularmitosis
This would make a great set of flashcards for a spaced-repetition system!
Thanks for publishing these.

~~~
RMPR
You should check this out
[https://github.com/ashlinchak/mdanki](https://github.com/ashlinchak/mdanki)

------
feralsky
Great effort! Often thought about creating a blog for such things but never
progressed further.

------
mekster
Referencing the selected element in Chrome with $0 certainly saves quite a few
typing.

~~~
BenjiWiebe
This is the biggest takeaway from this whole HN post/thread. And it works the
same on Firefox! Thanks so much!

------
lebuffon
I'm so old I remember when TIL meant Threaded Interpreted Language.

:)

------
chrisweekly
Thanks for sharing! This is awesome.

------
jbverschoor
Great list

------
apl002
ive saved this...super cool!

------
johnghanks
github is not a blog.

~~~
CharlesW
Somebody should let GitHub know.

[https://github.blog/2008-09-16-use-github-as-your-
blog/](https://github.blog/2008-09-16-use-github-as-your-blog/)

~~~
yesenadam
I clicked the link on that page to "go see for myself" and got a 404..

~~~
RMPR
> I have a habit of changing my blog URL and software a lot and I’ve lost a
> great many posts over the years.

~~~
yesenadam
From the amasci.com FAQ:

 _NEVER EVER move one single html file or change an URL. Don 't you hate it
when you click on a link and it says "404 file not found"? Well, I've been
here since 1994, and all the links to my site still work!_

He's full of what seems to me good advice, e.g. from the same page:

 _Make your website be your filing cabinet. If you have little projects
underway, put them on your website while working on them. Reject the paper-
publishing traditions of polishing an article to perfection before
publication. DO NOT ELEVATE IMAGE OVER CONTENT. (Perhaps even keep yourself
honest by cultivating a deep revulsion for "image.") Instead, let all your
flaws hang out, and type things directly into your site in rough draft form
(label them UNDER CONSTRUCTION if you really must)._

 _Expunge the fear of embarassment from your life, and instead practice making
foolish mistakes in front of thousands of strangers. Stop using your PC to
store files, instead use your website as your main storage. Let people poke
through your filing cabinet. It will contain far more than a perfectly
polished website does._

[http://amasci.com/faq.html](http://amasci.com/faq.html)

------
hhsuey
I don't really see the point of this, except that it helps the author stay
consistent to make updates and learn things. I'm not really sure why anyone
would consume this, except for curiosity into what they could do for
implementing their own consistency forcing function.

~~~
hhsuey
Sorry, good work to the author. I'm kind of a downer, and personally
struggling to find motivation to work on projects, but often shoot myself down
first. I don't see the point in a lot of projects out there.

~~~
recursive
Sometimes I do projects before I find a purpose for them. Often, I never do.

~~~
hhsuey
Would you say you've done a lot of projects though and that was the win
itself? And that despite not being able to find a purpose to most of the
projects, the benefit has been the learning/growth/experience/fun/etc...?

~~~
recursive
Fun, learning, an occasional surprise practical applications have all
happened.

