Table of Contents
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
-- call auth.login_as_user('[email protected]'); | |
create or replace procedure auth.login_as_user(user_email text) | |
language plpgsql | |
as $$ | |
declare | |
auth_user auth.users; | |
event_jsonb jsonb; | |
result_event jsonb; | |
begin |
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
DO $$ | |
DECLARE | |
batch_size INT := 100000; -- Number of messages to pop per batch | |
total_messages INT := 0; -- Count of total messages popped | |
batch_count INT := 0; -- Count messages in the current batch | |
start_time TIMESTAMP; | |
end_time TIMESTAMP; | |
result RECORD; | |
queue_name TEXT := 'my_queue'; | |
message_ids BIGINT[] := '{}'; -- Array to hold message IDs for bulk delete |
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
-- SELECT pgmq.create('my_queue'); | |
DO $$ | |
DECLARE | |
i INT; | |
batch_size INT := 1000; -- Change this to experiment with different batch sizes | |
total_messages INT := 1000000; -- Total number of messages to send | |
msgs JSONB[]; | |
start_time TIMESTAMP; | |
end_time TIMESTAMP; | |
queue_name TEXT := 'my_queue'; |
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
# cat extlinux.conf | |
# Generated file, all changes will be lost on nixos-rebuild! | |
# Change this to e.g. nixos-42 to temporarily boot to an older configuration. | |
DEFAULT nixos-default | |
MENU TITLE ------------------------------------------------------------ | |
TIMEOUT 50 | |
LABEL nixos-default |
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
# Sample variables file for BCM94356Z NGFF 22x30mm iPA, iLNA board with PCIe for production package | |
NVRAMRev=$Rev: 492104 $ | |
#4356 chip = 4354 A2 chip | |
sromrev=11 | |
boardrev=0x1102 | |
boardtype=0x073e | |
boardflags=0x02400201 | |
#0x2000 enable 2G spur WAR | |
boardflags2=0x00802000 | |
boardflags3=0x0000000a |
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
[ 0.000000] Booting Linux on | |
physical CPU 0x0000000000 [0x410fd034] | |
[ 0.000000] Linux version 5.4.89 (nixbld@localhost) (gcc version 9.3.0 (GCC)) #1-NixOS SMP Tue Jan 12 19:16:25 UTC 2021 | |
[ 0.000000] Machine model: FriendlyElec NanoPC-T4 | |
[ 0.000000] efi: Getting EFI parameters from FDT: | |
[ 0.000000] efi: UEFI not found. | |
[ 0.000000] cma: Reserved 32 MiB at 0x00000000f6000000 | |
[ 0.000000] NUMA: No NUMA configuration found | |
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff] | |
[ 0.000000] NUMA: NODE_DATA [mem 0xf57ef800-0xf57f0fff] |
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
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] | |
[ 0.000000] Linux version 5.4.89 (nixbld@localhost) (gcc version 9.3.0 (GCC)) #1-NixOS SMP Tue Jan 12 19:16:25 UTC 2021 | |
[ 0.000000] Machine model: FriendlyElec NanoPC-T4 | |
[ 0.000000] efi: Getting EFI parameters from FDT: | |
[ 0.000000] efi: UEFI not found. | |
[ 0.000000] cma: Reserved 32 MiB at 0x00000000f6000000 | |
[ 0.000000] NUMA: No NUMA configuration found | |
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x00000000f7ffffff] | |
[ 0.000000] NUMA: NODE_DATA [mem 0xf57ef800-0xf57f0fff] | |
[ 0.000000] Zone ranges: |
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
package main | |
import ( | |
"fmt" | |
) | |
func fibonacci(n uint) uint64 { | |
if n <= 1 { | |
return uint64(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
mysql> describe account; | |
+----------+------------------+------+-----+-------------------+-------------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+----------+------------------+------+-----+-------------------+-------------------+ | |
| id | int(10) unsigned | NO | PRI | NULL | auto_increment | | |
| username | varchar(255) | NO | | NULL | | | |
| ts | timestamp | YES | | CURRENT_TIMESTAMP | DEFAULT_GENERATED | | |
+----------+------------------+------+-----+-------------------+-------------------+ | |
3 rows in set (0.01 sec) |
NewerOlder