Before running the transcription script, ensure you have the following installed on your system:
- Python 3.10 or later
pip(Python package installer)ffmpeg
| SELECT * | |
| FROM | |
| ( | |
| SELECT 'a' AS foo | |
| UNION ALL | |
| SELECT 'b' AS foo | |
| UNION ALL | |
| SELECT 'c' AS foo | |
| UNION ALL | |
| SELECT 'd' AS foo |
OS: RaspberryPI Lite (But I think something like Ubuntu server would work as well) users dvandenbosch (sudoer) gui (non sudoer)
install dotfiles (This is for Dan Van Den Bosch own sanity) (Not required) https://github.com/danielleevandenbosch/dotfiles
create this file as root /etc/systemd/system/[email protected]/autologin.conf
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository 'deb http://ftp.de.debian.org/debian sid main' #https://packages.debian.org/sid/amd64/openjdk-8-jdk/download -- you can change to another mirror here
sudo apt update --allow-unauthenticated
sudo apt install openjdk-8-jdk
java -version
echo "export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))" | sudo tee -a /etc/profile
source /etc/profile
echo $JAVA_HOME
| -- Query for X$Attrib table | |
| SELECT | |
| my_Attrib.Xa$Id AS my_Id | |
| , my_Attrib.Xa$Type AS my_Type | |
| , my_Attrib.Xa$ASize AS my_ASize | |
| , my_Attrib.Xa$Attrs AS my_Attrs | |
| FROM X$Attrib AS my_Attrib; | |
| -- Query for X$Field table | |
| SELECT |
| CREATE OR REPLACE FUNCTION $funcname$ () RETURNS VOID LANGUAGE plpgsql VOLATILE AS | |
| $$$ | |
| /* | |
| ================================================== | |
| Author: $user$ | |
| Created At: $date$ | |
| Where Used: $var$ | |
| ================================================== | |
| */ | |
| DECLARE |
| DO | |
| $$ | |
| DECLARE | |
| value int := 0; | |
| sql text := 'The constructed select statement'; | |
| rec1 record; | |
| rec2 record; | |
| BEGIN | |
| FOR rec1 IN | |
| SELECT |
| --table search | |
| SELECT id '#' | |
| ,owner AS schema_name | |
| ,c.tbl AS table_name | |
| ,col AS column_name | |
| ,nullflag AS nullflag | |
| FROM sysprogress.syscolumns_full AS c | |
| WHERE 1=1 | |
| AND c.tbl LIKE '%%' | |
| AND c.col LIKE '%order%' |
| CREATE or replace FUNCTION trunc_on_nth_occurrence_of_string( | |
| _original_string text | |
| , _search_string TEXT | |
| , _nth_occurrence int | |
| ) RETURNS TEXT LANGUAGE sql AS $$ | |
| /* | |
| ================================================== | |
| Author: dvandenbosch | |
| Created At: 7/9/2020 | |
| Where Used: https://stackoverflow.com/questions/62801797/find-nth-position-of-a-specific-character-in-a-string-in-postgres/62802753#62802753 |
| create or replace function it.function_get_create(_schema_dot_table text, _single_pkey_column_name text DEFAULT 'id'::text, _single_pkey_column_type text DEFAULT 'INTEGER'::text) returns void | |
| language plpgsql | |
| as $$ | |
| /* | |
| *************************************************************************************************** | |
| Create Date: 2019-03-25 | |
| Author: Dan Van Den Bosch | |
| Used By: SQL consoles. | |
| Why: This is to be ran by SQL developers on tables to create functions that get 1 row | |
| Usage: SELECT it.function_get_create('myschema.mytable') |