Skip to content

Instantly share code, notes, and snippets.

View AlessandroLorenzi's full-sized avatar
🏠
Working from home

Alessandro Lorenzi AlessandroLorenzi

🏠
Working from home
View GitHub Profile
package equal_stack
func equalStacks(h1 []int32, h2 []int32, h3 []int32) int32 {
allHeights1 := stackAllHeights(h1)
allHeights2 := stackAllHeights(h2)
allHeights3 := stackAllHeights(h3)
var commonBetween12 []int32
@AlessandroLorenzi
AlessandroLorenzi / json_generated_columns.sql
Created August 6, 2022 23:15
Testing json generated columns
DROP TABLE activities;
CREATE TABLE activities (
id serial NOT NULL PRIMARY KEY,
activity json NOT NULL,
type text GENERATED ALWAYS AS (activity ->> 'type') STORED,
name text GENERATED ALWAYS AS (activity ->> 'name') STORED
);
INSERT INTO
@AlessandroLorenzi
AlessandroLorenzi / friendica.conf
Created July 31, 2022 08:47
Nginx friendica configuration
server {
listen 80;
listen [::]:80;
server_name lorenzi.one;
root /srv/friendica;
index index.php;
access_log /var/log/nginx/friendica.access.log;
error_log /var/log/nginx/friendica.error.log;