mkdir supabase-for-my-app && cd "$_"
git clone -n --depth=1 --filter=tree:0 https://github.com/supabase/supabase .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration | |
DB_HOST="" | |
DB_PORT="" | |
DB_NAME="" | |
DB_USER="" | |
DB_PASS="" | |
DIR="" | |
DATE=$(date +"%Y%m%d_%H%M%S") |
Download the whole planet dataset (~80 Gb)
curl -OL https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
Using osmium tool filter amenity=toilets
nodes
osmium tags-filter planet-latest.osm.pbf n/amenity=toilets -o toilets.osm
-
Why golang
sql
andsqlx
libraries can't parsearray_agg
? -
Why golang
json
library parse[null]
as a struct with default values (int = 0
,string = ""
) instead of an error or an empty array ? -
Why postgres
COALESCE(jsonb_agg(DISTINCT to_jsonb(ti)), '[]')
still returns[null]
instead of[]
?
I want to addFILTER…
As always:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on: https://www.hughesportal.com/blog.php?article=setup-network-bonding-using-netplan | |
network: | |
version: 2 | |
ethernets: | |
enp2s0f0: | |
dhcp4: no | |
dhcp6: no | |
enp2s0f1: | |
dhcp4: no | |
dhcp6: no |
NewUser=winston
sudo useradd $NewUser --create-home
sudo mkdir /home/$NewUser/.ssh
sudo touch /home/$NewUser/.ssh/authorized_keys
sudo chown -R $NewUser:$NewUser /home/$NewUser/.ssh
sudo chmod 700 /home/$NewUser/.ssh
sudo chmod 600 /home/$NewUser/.ssh/authorized_keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check_limit() { | |
// Get the active sheet | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
// Get the range of the selected column | |
var data = sheet.getDataRange().getValues(); | |
// Count the rows | |
var numRows = data.length; | |
var startRow = 4; | |
var limitCol = 3; | |
// Save the selected the Column |
Here is a brief description of what the Bash command I provided does:
- It sets the variable $season to the season number.
- It sets the variable $index to the current video index.
- It uses a while loop to read each line of the file batch-url.txt and extract the URL from each line using awk.
- If the line is not empty and does not start with a # character (i.e. if it is not a comment), it passes the URL to the yt-dlp command with the filename prefix "S" followed by the season number (contained in the $season variable), followed by "E" and the index of the current line, with a leading zero added if the index is less than 10 (e.g. "01" instead of "1").
This command allows you to download multiple videos from an input batch file by adding the season number and index of each video to the filename prefix.
Note: this command will only work if the yt-dlp command is installed on your system. If it is n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# put this file in /usr/local/bin | |
# vtt2srt my_subtitle.vtt | |
import os, re, argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("filename", help=".vtt file") | |
args = parser.parse_args() | |
input_path_filename = args.filename |
NewerOlder