I've been writing TILs for 5 years(github.com) |
I've been writing TILs for 5 years(github.com) |
:)
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...
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.
This type of thing has actually happened to me several times in the past year or so, where I'd be frustrated an obviously good feature doesn't exist, I'd Google it to see if other people complain about the same thing... only to find it exists after all.
There needs to be a word for this...
* 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
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.
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:";
};
}Do Windows browsers no longer support them?
Sara Soueidan has a similar log oriented toward UI work:
EDIT: Just like this: https://til.hashrocket.com/ but open to anyone to sign up
I think there’s lots of room for simple, purpose built web apps for stuff like this.
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
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!
Maybe it's too well-known, but this command changed my life and I haven't found in the linked list of TILs.
If you want to change a single line without doing a visual selection, '==' does the trick.
Guess I better start today!
https://dev.to/jbranchaud/how-i-built-a-learning-machine-45k...
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.
:(
(admittedly, this was all just an attempt at making a sufficiently substantive comment so I could make the joke about 'ack --bar')
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.
Anyway, thanks for sharing your tips!
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?
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.
It's interesting they chose to alphabetize and start many entries w/ verbs.
u="https://raw.githubusercontent.com/jbranchaud/til/master/"; curl "${u}README.md" | sed -e '/### JavaScript/,/### /!d;//d' | awk -F'[()]' '{print $2}' | xargs -n1 -I{} curl "$u{}" >> til-javascript.mdIt allows both private and shared insights, so people can learn together. Check it out
90 percent of the time, that minor change either isn't suitable for being committed back to the project (it's badly hacked in, it's too specific to my usecase, etc.), Or the change ends up being harder to make or test than I had imagined, so I give up but don't bother deleting the fork.
That could explain the large number of forks and small number of PR's
[wow whoever wrote this was an idio... oh nevermind ^I'll just walk out now]
If I read the manual for everything I've ever used, I'm not sure I'd have time to actually accomplish anything in the end.
Sure, let me spend a day reading through the lists of keyboard/mouse shortcuts for every piece of software I use just to see if there's anything useful in there? No thanks...
Good UX would pop up a balloon informing me of the feature after the first time I held down my left-arrow key for more than, say, keypresses.
Of course, you might as well disregard the manual and discover things on your own as you need them. Nevertheless, it helps to go at this with a mindset of "this feature surely already exists" lest you're compelled to develop a worse version of the feature yourself.
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.
Yikes, is this a random process?
Typically with mouse enabled, you can select text with the mouse, but this doesn't go to the X clipboard. While with mouse disabled, text selected with the mouse goes to the X clipboard.
But actually this depends entirely on the terminal emulator. The Alt/Option key works with the default preferences for iTerm2 on MacOS, but with GNOME terminal I reproduced the same behavior using Shift instead.
Anyone that hasn't been exclusively using macOS for their entire digital life, or at least years, anyway.
'Command' (resp. 'Windows', resp. 'Super') is a different story. You can't say 'Super' with a straight face without also marking yourself out as someone who borders on saying 'GNU with Linux', or 'I run Arch'.
(For what it's worth, I do run Arch. ;))
IIRC Option is dually labelled as Alt on some Apple keyboards anyway.
Since basically nobody knows the historical difference these days, I just call it the Meta key to avoid the above situation. When non-techy people ask me what the hell I mean, I just explain that's the technical term for the key and that I use it so both Mac and Windows people understand me. I've even heard one of them start using the term themselves, presumably to appear smarter in front of their boss.
<c-a> = go to beginning of line
<c-e> = go to end of line
!! = repeat last command
<esc> b = move "back" one word (also <c-b> and <c-left>)
<esc> f = move "forward" one word (also <c-f> and <c-right>)
Many others exist. See `man bash` under READLINE.
!!enter which is 3 buttons where as up-arrow enter is the same thing.
See sudo !!.