For further actions, you may consider blocking this person and/or reporting abuse
Read next
Building a Discord-to-Telegram Token Address Forwarder
Jason Smith -
Understanding the Role of Behavioral Health in Value-Based Healthcare Companies’ Models
Jewel Soozen -
Kryptowaluta: Klucz do Finansowej Rewolucji?
Douglas Henderson -
Launching Your First AWS EC2 Instance: A Complete Guide for DevOps Beginners
Shubham Sharma -
Top comments (242)
Objective-C block syntax
bash test format and flags
vim macro create and execute
I noticed I could never remember these, so I always make aliases, shell functions, or short ~/bin/ scripts for them instead:
tar: xkcd.com/1168/
netstat flags (other than "-tulpn" which I have memorized as "tull-pin" like "Tolkien")
ssh tunnel syntax
Edit: *in one-line.
Array to list:
List to array:
Clear as mud...
Helpful protip. I learned yesterday, that
list.toArray(new String[0])
is faster than the version with the explicit size given.I was about to write the same thing. How to vertically align elements... without using flex 😂
Regex. While I understand how it works and how it can be used, it's difficult for me to memorize the right regex that should be used at every point. So I just google whenever I want to make use of it. :)
Oh yeah that's a big one
I was just like that... but then I've found regex101.com/ and now, I'm almost proficiente writing regex!
regex101 is the single best resource I've ever found for regex.
It's funny in my case. I know enough regex to get by, but I generally need to google to find out how to actually apply it.
Do I need
RegExp.prototype.test
orString.prototype.match
in JS? What are the order of parameters inpreg_match
in PHP? What are the little parentheses things called in .NET, captures or groups?I had the same problem, until I found Rubular:
rubular.com/
Bonus tip: making a permalink will also save all the test cases used. Makes for an excellent inline comment!
Same here...
BTW, I knew someone must've been written about regular expressions when I read the title.. 😂
Me too!
Hahaaahaa
I always have to Google regex. Or copied old code.
I can never remember how it works either. I found this to be helpful, though! regexr.com/
Same here. I can only remember $,,*,+ and /s /w. I always end up up googling an example and going from there.
For me it's "manually start postgresql"
Every once in a while my postgres server isn't running and I know to punch that into my browser and land on this Stack Overflow question, where I proceed to copy this command into my terminal:
It happens infrequently enough that I never bother to alias it or remember how to type it out. I just remember what to Google.
I have postgres installed via homebrew. So I use
brew info postgres
to copy the start command :)So did I then I realize how many precious minutes of my life I'm losing so I decided to buy a domain for 75 cents mycodesnippets.space :) I write things down little by little as soon as I need it the first time or I risk to never do it by lazyness !
I was gonna say this. Have bookmarked the stackoverflow post on this. :D
cant you just sudo service postgresql start ? :P
On Linux, yes. On OSX, no unfortunately.
Oh yes, I even googled and used this today because my service keeps stopping.
How to make a tar file...
at least extracting is easy (say it in a german accent) tar -xzf "xtract ze files"
and -czf == 'compress ze files'
well what works for me is tar -xzvf "xtract ze vucking files"
No kidding that's how remember it
That's a great way! Jajajaaj
But it's important to note that tar is smart enough to detect the format so I prefer the general
tar -vxf
Even though as a German with decent English pronunciation this is a little bit insulting, I'll probably never forget this ever again. Thanks! 🙈
Thank you so much.
Isn't that for zipped tar files? -xzf = extract zipped (tar) file.
I threw this one at a dev I used to work with. He answered instantly, he could have disarmed 2 bombs with that speed.
Instant respect gained
I figured out how to remember it. To create tar, use
c
option and for extracting replacec
withx
==>$tar
will remain same for both Lol :) .tar -cvf filename.tar file/dir_path
&&tar -xvf filename.tar
.Hey, I also want to make a tar file for my website name:Lenny face. Let me know if the given suggestions works for you!
sed
andawk
and how to use them.I just
ssh-k
↑ in zsh and just list all previous key generation commands or if I am not sure what I am looking for I use fzfI was helping someone with this earlier this year. Ended up creating a helper for it:
gist.github.com/Kunde21/3633e1e9ef...
Suprised tldr didn't got mentioned.
It's a pretty neat tool to do this kind of things...
Best link I've seen all week. Heroic!!!!!
That's awesome! thanks
Javascript array methods. Is this one in-place, or returning a new array? I don't know, but MDN does!
And centering things. Completely clueless every time.
here's a handy multiple choice questionnaire!
howtocenterincss.com/
holy crap, whoever made this site needs a medal. Great recommendation!!!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.