by xero updated 10.29.24
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
# update_timezones.py | |
# Aleksandr Pasechnik | |
# | |
# Goes through the Day One jounal and sets the Time Zone of each entry that | |
# doesn't already have one to the value of the *timezone* variable. Makes a | |
# backup copy of each entry it modified by adding a '.tzbak' to the filename. | |
# Ignores any entry that already has a '.tzbak' version. | |
# | |
# NOTE: base_dir may need to be adjusted to the correct Journal_dayone location | |
# NOTE: It is probably a good idea to have a full journal backup just in case |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real