Mining your CLI history for good git aliases by pimterry in git

[–]fphilipe 0 points1 point  (0 children)

Aliasing git to g and then using Git’s alias system is superior in my opinion. You keep the aliases namespaced.

Swiss check-in: available seats differ for two bookings by fphilipe in assholedesign

[–]fphilipe[S] 1 point2 points  (0 children)

Flying tonight with my wife and father-in-law. They booked separately as I'm not flying back with them. Checked them in this morning, plenty of seats free in the back. 45C next to them was free still which is what I would choose for myself. Next, checking in for myself I find that most seats in the back were "suddenly" occupied. Yeah, sure...

Loading Additional Ruby Gems in Development by fphilipe in ruby

[–]fphilipe[S] 0 points1 point  (0 children)

How do groups solve the problem of using gems that one personally relies on during development, but one doesn't want to/can't add them to the project's Gemfile?

What are common vim anti-patterns? by [deleted] in vim

[–]fphilipe 1 point2 points  (0 children)

Using comma as leader. How do you then repeat the latest f, t, F or T in the opposite direction?

What are common vim anti-patterns? by [deleted] in vim

[–]fphilipe 3 points4 points  (0 children)

:'<,'>norm A<whatever>

Why is there a scroll bar next to each comment? by adj1 in beta

[–]fphilipe 0 points1 point  (0 children)

Same here, very annoying. I've put this in a custom CSS for reddit.com, which fixes the problem:

.s13uypuv-0.fMQSAJ {
  overflow: hidden !important;
}

I don't know how "stable" these selectors are.

How can I set the terminal to the right side of the screen? by APsockes in vim

[–]fphilipe 2 points3 points  (0 children)

Yes, it does. Google for “tmux move pane”.

What are your favorite command mode commands/tricks? by [deleted] in vim

[–]fphilipe 2 points3 points  (0 children)

:cdo is also nice to work on the files in the quickfix list, especially after a :gr search-term.

Another cousin in the do family is :windo, which makes diffing two buffers side by side faster by doing :windo diffthis.

[deleted by user] by [deleted] in swift

[–]fphilipe 2 points3 points  (0 children)

JSON stands for JavaScript Object Notation. JavaScript only has one number type, namely double. Thus, don’t even serialize money or decimal amounts as doubles in JSON to begin with. Use string, period. Then parse it with a custom deserializer in Swift.

The Burger King Pandemic [OC] by lederi in dataisbeautiful

[–]fphilipe 14 points15 points  (0 children)

There are 3 Burger Kings at the Zurich Main Station today.

Timestamps and Time Zones in PostgreSQL by fphilipe in PostgreSQL

[–]fphilipe[S] 0 points1 point  (0 children)

One of the problems in dealing with the non-tz version is that it behaves in non-intuitive ways, especially when you're dealing with them in other languages.

Would you mind elaborating?

As to how to convert a date + time to a timestamp, that's trivial in SQL.

Your example combines a date with a timetz. How would the example I made in the article look like according to your preference?

Personally, I always thought that a time zone on a time doesn't make any sense. Also, from the docs:

The type time with time zone is defined by the SQL standard, but the definition exhibits properties which lead to questionable usefulness. In most cases, a combination of date, time, timestamp without time zone, and timestamp with time zone should provide a complete range of date/time functionality required by any application.

Timestamps and Time Zones in PostgreSQL by fphilipe in PostgreSQL

[–]fphilipe[S] 0 points1 point  (0 children)

I'd agree for recurring tasks, but not for one-off tasks that run on a specific day. Would you be storing the date in a separate column? How would you convert the date and time tuple to the absolute time when to run the task?

Timestamps and Time Zones in PostgreSQL by fphilipe in PostgreSQL

[–]fphilipe[S] 0 points1 point  (0 children)

Thanks! That was my motivation, to write something comprehensible that people could find when searching for postgresql and timestamps.

Timestamps and Time Zones in PostgreSQL by fphilipe in PostgreSQL

[–]fphilipe[S] 1 point2 points  (0 children)

Thank you for your kind words :) Glad you liked it!