Skip to content

Instantly share code, notes, and snippets.

View edpyt's full-sized avatar
🦍
todo!();

edpyt

🦍
todo!();
View GitHub Profile

CockroachDB and Docker Compose

This is the first in a series of tutorials on CockroachDB and Docker Compose

  • Information on CockroachDB can be found here.
  • Information on Docker Compose can be found here
  1. Install Docker Desktop

Because we already have an official CockroachDB docker image, we will use that in our docker-compose.yml file. We recommend you use one of the current tags instead of latest.

@RebelLion420
RebelLion420 / TermuxArchSetup2024.md
Last active March 15, 2025 21:43
How to set up Arch Linux in Termux on Android

NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.

Install Termux from the Play Store and launch it

Once it finishes unpacking:

pkg update

pkg upgrade -y

@abitrolly
abitrolly / postdata.py
Last active July 12, 2024 03:11
POST JSON with Python3 urllib
# Public domain
from urllib import request
def post_data(url, data, headers={'Content-Type':'application/json'}):
"""
POST data string to `url`, return page and headers
"""
# if data is not in bytes, convert to it to utf-8 bytes
bindata = data if type(data) == bytes else data.encode('utf-8')
@Checksum
Checksum / postgresql-event-trigger.sql
Created August 1, 2018 07:20
Automatically create column on new tables using PostgreSQL event triggers
-- Function to automatically create a user_id column for new tables with name starting with user_
create or replace function create_user_id_column()
returns event_trigger
language plpgsql volatile as
$$
declare
obj record;
identity text[];
begin
for obj in select * from pg_event_trigger_ddl_commands()
@hfossli
hfossli / standard.sh
Last active March 4, 2025 12:58
Standard bash script format
#!/bin/bash
CLEAR='\033[0m'
RED='\033[0;31m'
function usage() {
if [ -n "$1" ]; then
echo -e "${RED}👉 $1${CLEAR}\n";
fi
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]"