What do you Google EVERY. SINGLE. TIME. and never just memorize?

Did you find this post useful? Show some love!

Hey there, we see you aren't signed in.

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❤️

at least extracting is easy (say it in a german accent) tar -xzf "xtract ze files"

well what works for me is tar -xzvf "xtract ze vucking files"
No kidding that's how remember it

this...is actually brilliant! lol

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

I figured out how to remember it. To create tar, use c option and for extracting replace c with x ==> $tar will remain same for both Lol :) . tar -cvf filename.tar file/dir_path && tar -xvf filename.tar.

I was about to write the same thing. How to vertically align elements... without using flex 😂

ha ha CSS are craziest language I have ever worked upon

And centering things. Completely clueless every time.

here's a handy multiple choice questionnaire!


holy crap, whoever made this site needs a medal. Great recommendation!!!

man, i have a good one for that. put a before with height 100%, display inline block and vertical align middle on your holder div. vertical align middle and display inline block to the elements.

The same with me!! But I found VerbalExpressions (github.com/VerbalExpressions) to have solved it for me.

That is very good to know about.

I usually just go to regexr.com and trial-and-error the syntax until it matches what I want.

How to find out which process is listening on a certain point on my mac. I'm often switching between projects, and have a server from another project running on a port that I now need for another server.

And it looks like Heroku's CLI doesn't always stop all processes correctly when you stop it using ctrl+c

You could add a function to your .bashrc to make this easier:

listening() {
    lsof -n -iTCP:$1 | grep LISTEN

Then (after restarting your terminal or typing source ~/.bashrc) type listening 8080 to find out what process is blocking that port.

How to properly write a Rails migration file.

Add a column? Huh? What???

Oh yeah. I always copy and paste from old files.


rails g migration AddStuffToTableName new_column1:integer new_column2:text #etc. etc.
  • Converting Array<->List in Java*. Been coding Java for 6+ years and still don't care to learn/memorize this.
  • 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:

String[] array = ...;
List<String> immutableList = Arrays.asList(array);
List<String> mutableList = new ArrayList<String>(Arrays.asList(array));

List to array:

List<String> list = ...;
String[] array = list.toArray(new String[list.size()]);

Clear as mud...

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. :)

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 or String.prototype.match in JS? What are the order of parameters in preg_match in PHP? What are the little parentheses things called in .NET, captures or groups?

Same here...
BTW, I knew someone must've been written about regular expressions when I read the title.. 😂

I had the same problem, until I found Rubular:


Bonus tip: making a permalink will also save all the test cases used. Makes for an excellent inline comment!

I can never remember how it works either. I found this to be helpful, though! regexr.com/

I always have to Google regex. Or copied old code.

Same here. I can only remember $,,*,+ and /s /w. I always end up up googling an example and going from there.

sed and awk and how to use them.

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:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

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 :)

I was gonna say this. Have bookmarked the stackoverflow post on this. :D

I could never remember "rails new myapp --database=postgresql" :|

Oh yes, I even googled and used this today because my service keeps stopping.

cant you just sudo service postgresql start ? :P

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!!!!!

How to extract tar.gz file in Linux command line!

Saw a comment from above and it changed my life.

tar -xzf filename xzf = "Xtract Ze Files!" (german accent)

Excellent, noté that you may get ride of the dash.

tar -xf filename

Read as tar eXtract File filename.
Saw this on an SO answer and never had to google it ever again :)

Wow, I never thought of it.

Thanks :)

Javascript array methods. Is this one in-place, or returning a new array? I don't know, but MDN does!

Yeah. For some reason I really find some git procedures harder to memorise than others. It's ludicrous the number of times I've googled "git unadd a file" and "git reset branch to remote"

How to delete a remote branch in git.

Oh boy, this gets me every. Single. Time.

Cherry picking commits in git, because I can never remember if it's cherrypick or cherry-pick

A more efficient way would be to just do it and correct if it errors, or alias it to git cherry or something

Also, how to exit vim, and how to insert in vim, and basically how on Earth did I end up in vim omg get me out

I would be responsible for 95% of hits coming from google search into the Tutorialpoint's html5 minimal template. Now I could easily type it in every time I set up a new page, but it is now a matter of extreme laziness I think.

How to "unignore" files with git... Here is a nice and short way.

This is stupid but g++ compiling filename and output order in the terminal. I've been doing it for four years now and still failing to remember.

ln -s [source] [destination] or ln -s [destination] [source] ?
find . -name [...] -exec grep '...' {} \;

And of course sed, awk and more generally shell syntax (if, loops, switch, etc).

Many moons ago, at one of my first jobs, I got myself in trouble with this. I was editing something in prod without knowing how to save or exit. I was a windows nt guy mostly. So, like one does, I hard-rebooted the server instead of asking for help... After the dust cleared, my boss made me sit at a keyboard for over an hour launching vim and learning how to at least save and exit. :) I have :wq, :q,:q! burned into my muscle memory to this day...

I don't have to Google the spelling, but I'd say 99% of the time I type "valud". I say it correctly as "val-id" and only mistype because of the QWERTY keyboard layout. This is the only word that I consistently type incorrectly. It's not a speed thing (like "teh"), because it happens when typing slowly as well. I've been typing for a really long time and I'm beginning to think my brain just thinks this is a funny prank.

This! Plus a few other words: convenient, conscience, accommodate. I'm not a native speaker ;).

Find a file in Linux. I know it involves "find" and "name" but I have to look up the exact syntax each time. (For reference, the sledgehammer version is find . -name testfile.txt from the root of the drive.)

As a non native english speaker:




Usually, anything that is outside of my basic Git workflow.

PHP array_push and array_key_exists parameters order.

Argument orders in all array functions in PHP for me. That's just horrible. VSCode gives hints though, so that helps. I still have to look up the exact names of functions regularly, though.

this alone should tell you you need to use another language ;)

unzip a tar file especially with that different extensions .xz , .bz etc..

vim commands to cut,copy and paste

regex in python and other python builtins . Can't memorize the whole docs right ?

Updating the list of git remote branches. It doesn't refresh when you sync so it will continue to list remote branches that don't even exist anymore until you manually run the command below. (Which I had to google again to put in this comment.)

git remote update origin --prune

easy to remember because it is like dried fruit!

How to git checkout a remote branch. I’m gonna try it it without googling

git remote add repoFork <url>
git fetch repoFork
git checkout —track repoFork/branch

I hope that’s right I just looked it up again yesterday

I literally added an alias to my ZSH config for this one

alias flushdns='sudo killall -HUP mDNSResponder'

How to type this: ¯\_(ツ)_/¯

Ha! Me too. I know to go straight to textfac.es

"How to do x in CSS" where x is anything

MySQL and PHP date formatting. Every time. What’s weekday again?

My first choice was "Regex", but it seems you guys beat me to that choice.

So, without a shame I can say that everytime I search "how to insert an element at the end of another with jquery". Frigging append(), man.

Vim commands.

Just...I can't even.

ever play:



bonus tip: a lot of unix commands support vim keys by default. i.e. less and man

How to use "find ... -exec ..." correctly.

  • CSS attributes
  • Rails generators
  • ActiveRecord queries
  • Syntax for any function I don't use on a weekly basis

flexbox and grid with all their different attributes and values :/

When I accidentally commit on master instead of a branch and I need to reset my master to match origin:

git reset --hard origin/master

  1. I always Google how to create a webpack configuration file.
    • You need to be a 🚀👨‍🔬 to configure it from memory.
  2. Adding a style tag for CSS files 😝.

In-place string substitution; usually performed on multi-gigabyte database dumps:

sed -i 's/STRING_TO_REPLACE/REPLACEMENT_STRING/g' reallybigdb.sql

How to use grep and find.
Also when I write data = {} in Python, is this a set or a dict?

This can't be a Set

data = {}

It's always a dictionary!
If you want an empty Set use:

data = set()

P.S. it's handy to use the official Python REPL and type type(youvariable) ;)

The argument order to the various PHP array functions

Yesterday was the first time I deleted a tag or branch (it was a tag) from a remote git repo without googling it first. Pretty proud of that.

The order of arguments for map/reduce/filter is JS. Was it (index, item) or (acc, index, item) or (item, index)....

The arguments for JavaScript's array.slice method. Every. Damn. Time.

The order of arguments to the reduce callback or block in any language.

"github ssh-keygen example" :D

Switch statement format. I always forget where the {} and the () go.

And of course Regex - because memorizing Regex notation and rules is a waste of energy

When "gitignore is not ignoring" some file, there is always a line that I need to check to delete all the files from cache

  • Any and all matplotlib commands.
  • Any and all d3.js commands.
  • Any and all visualization pretty much.

What the trim function is called in python

Java decompilers/deobfuscator even though I have my own written

Any switches I don't use often with linux commands.

How to save and quit in vim

what are the order of arguments in short-syntax CSS like padding, margin...

mnemonic: it's clockwise starting from the top

Or, the more fun mnemonic I learned years ago: TRouBLe!

Yeah, I was thinking about this discussion another day, and I remembered this mnemonic... But damn, when I need to use, I Forget about it 😅
But thanks to both of you guys!

How to grep a text file without comments (#) and blank lines!

Bootstrap default mobile navigations 😭

How to revert my local branch to be exactly like its remote counterpart.

git reset --hard HEAD

  • Converting StdClass <-> Array in PHP -> I always forget 'True' as the second arg of json_decode()
  • Git Commands
  • Format for PHP date()
  • Casting to a class in Python3

Almost every javascript library API...

Classic DEV Post from Mar 28

Why doesn't CSS move faster (like JavaScript)?

JavaScript has always had warts that people put up with—but recently it has evo...

Follow @ben to see more of their posts in your feed.
Ben Halpern
A Canadian living in New York, having a lot of fun cultivating this community! Creator and webmaster of dev.to.
Trending on dev.to
Explain Proof of Stake (PoS) like I'm five
#explainlikeimfive #discuss #blockchain
What is your on-boarding process at your company?
#discuss #onboarding
How did you start working remotely ?
#discuss #career
Who's looking for open source contributors? (April 23 edition)
#discuss #opensource
Are all followers in dev.to real or bot ?
Often neglected skills new devs should learn?
#webdev #discuss #beginners
What is your favourite JavaScript framework?
#javascript #react #vue #discuss
How do I get experience when I have no experience?
#career #beginners #discuss