1: https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...
1,088 karma · joined November 8, 2010
https://github.com/fphilipe
[ my public key: https://keybase.io/philipe; my proof: https://keybase.io/philipe/sigs/182uf1x4SUnMvtmLchInbgTL0X0b0qcRGe_g2T0KLDo ]
1: https://developer.mozilla.org/en-US/docs/Web/API/MutationObs...
This move is very counter to Apple’s privacy stance.
> yes I do, it's in UTC, because I assume the application is written to correctly handle datetimes.
> > It is merely a wall time. Maybe it’s UTC,
> no, it's UTC.
No, you don't know that if you're looking at the database without knowledge of the app's conventions.
I don't understand your argument about ambiguity and implicit conversions. Yes, if your session or DB is configured to something other than UTC, it will convert the timestamptz values in your output to that time zone's offset, but it'll still include the offset.
Thus, a value "2019-04-01 00:00:00+00" that is output when using timestamptz with UTC (compared to "2019-04-01 00:00:00" when using timestamp), is output as "2019-03-31 19:00:00-05" when using EST. Both values represent the same moment in time, obviously, and are equivalent. Assuming your app and ORM convert everything to UTC, that shouldn't matter at all.
At least for me, writing an article like that takes time and lots of thought (plus forces you to grok the stuff deeply). I wish I could write more often (or at least, carve out the time and energy for it), haven’t written much since.
I recently started using the Decodable protocol and was surprised to find out that the `decode` methods all take an explicit type, e.g. `KeyedDecodingContainer.decode(Double.Type, forKey: KeyedDecodingContainer.Key)`. There's a method for each supported type. [1]
Not sure why they didn't just have one method to rule them all in the public interface, like this:
extension KeyedDecodingContainer {
public func decode<T: Decodable>(key: KeyedDecodingContainer.Key) throws -> T {
return try decode(T.self, forKey: key)
}
}
The usage then becomes much simpler (assume `name` is a property of type `String`): // Before:
name = try container.decode(String.self, forKey: .name)
// After:
name = try container.decode(key: .name)
[1]: https://developer.apple.com/documentation/swift/keyeddecodin...To see a list of supported types and the matching file extensions: ag --list-file-types.
Just checked and rg does have something similar, but you need to specify the type as an argument to a flag: rg --type ruby foo.
Absolutely. I've written two blog posts on PostgreSQL on topics that, in my opinion, weren't well covered and often misunderstood by its users. Both posts show up on the first page on a google search for "psql cli" and "postgres timezone".
I honestly never understood this whole fuss about SEO. In my opinion SEO is about good content. Good content over time will spread, which will result in a higher ranking.
Yes, but before they all looked the same and were hosted on the same platform.
I miss the days where you would encounter a blog filled with great content and with a unique look and feel. It's as if it almost burned in in my memory. I still remember how the website looked of some great articles that resonated with me.
That's one of the reasons I dislike Medium et al.
SELECT to_char(now(), 'IYYY-"W"IW');
The difference is when the first week of the year starts. Compare yours to the ISO 8601 format for January 1 this year: $ SELECT to_char('2017-01-01'::date, 'IYYY-"W"IW');
> 2016-W52
$ SELECT to_char('2017-01-01'::date, 'YYYY-"W"WW');
> 2017-W01 $ select '2016-03-31'::timestamp - '1 month'::interval;
> 2016-02-29 00:00:00
$ select '2016-03-31'::timestamp + '11 month'::interval;
> 2017-02-28 00:00:00
$ select '2016-02-29'::timestamp + '1 year'::interval;
> 2017-02-28 00:00:00Can't you just do this in PostgreSQL?
SELECT id FROM users WHERE email = lower('Foo@example.com')generate a second requirements file after having done `pip install -r requirements.txt` to get the exact versions that were installed
So you'd need to have a `requirements.txt` with loose versions suitable for upgrading your apps deps, run `pip install -r requirements.txt` and then `pip freeze > requirements.locked.txt`. Then everyone should be using `pip install -r requirements.locked.txt` as well as during your build. But that's cumbersome and error prone and doesn't free you from having the wrong version of a dep in case you `pip install some-package` later on.
The main problem with requirements.txt, as I see it, is that you don't get exact versions unless you specify it in your requirements.txt. So you'd have to have a loose requirements.txt and then generate a second requirements file after having done `pip install -r requirements.txt` to get the exact versions that were installed.
Further, if you happen to "accidentally" `pip install some-package` in your virtual environment, your app might now be using different packages locally without you noticing. With Pipfile the need for virtual environments is pretty much gone, assuming that at runtime it will automatically load the version of a package specified in the lockfile, which is not clear to me yet from the README.
hub fork username/repo
1: https://github.com/github/hub > !$:<tab>
& -- repeat substitution
A -- absolute path resolving symbolic links
Q -- strip quotes
a -- absolute path
c -- PATH search for command
e -- leave only extension
g -- globally apply s or &
h -- head - strip trailing path element
l -- lower case all words
q -- quote to escape further substitutions
r -- root - strip suffix
s -- substitute string
t -- tail - strip directories
u -- upper case all words