Другие интересные штуки тут: https://t.me/notes_of_programmer
select pid, user, client_addr, query_start, backend_type, substr(query, 0, 256) as query
from pg_stat_activity
where query_start is not null
and client_addr is not null;
Другие интересные штуки тут: https://t.me/notes_of_programmer
select pid, user, client_addr, query_start, backend_type, substr(query, 0, 256) as query
from pg_stat_activity
where query_start is not null
and client_addr is not null;
/* | |
Compile: | |
gcc -framework Foundation -framework AppKit screenshot.m -o screenshot | |
*/ | |
#import <Foundation/Foundation.h> | |
#import <AppKit/AppKit.h> | |
int main(void) { |
/* v5.1.0 - August 2021 */ | |
.accordion-body | |
.accordion-button | |
.accordion-collapse | |
.accordion-flush | |
.accordion-header | |
.accordion-item | |
.active | |
.alert | |
.alert-danger |
This is an adoptation of Git flow by Vincent Driessen with conventional commits and semantic release.
At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:
import { startSpan } from "@sentry/remix"; | |
import type { StartSpanOptions } from "@sentry/types"; | |
import { | |
type AnyColumn, | |
type AnyTable, | |
type BuildQueryResult, | |
type DBQueryConfig, | |
type DrizzleTypeError, | |
type Equal, | |
type ExtractTablesWithRelations, |
Install an Ubuntu version from Microsoft Store.
Please check out the Windows 10 Installation Guide written by Microsoft itself.
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
A lot of people misunderstood Top-level await is a footgun, including me. I thought the primary danger was that people would be able to put things like AJAX requests in their top-level await
expressions, and that this was terrible because await
strongly encourages sequential operations even though a lot of the asynchronous activity we're talking about should actually happen concurrently.
But that's not the worst of it. Imperative module loading is intrinsically bad for app startup performance, in ways that are quite subtle.
Consider an app like this:
// main.js