Skip to content

Instantly share code, notes, and snippets.

View h3xx's full-sized avatar
#GiveUpGitHub

Dan Church h3xx

#GiveUpGitHub
View GitHub Profile
@ArtBIT
ArtBIT / thou shall not pusg merge commits.txt
Last active August 6, 2022 16:41
PUSH REJECTED BY EVIL DRAGON BUREAUCRATS
+---------------------------------------------------------------+
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
+---------------------------------------------------------------+
\
\ ^ /^
\ / \ // \
\ |\___/| / \// .\
\ /V V \__ / // | \ \ *----*
/ / \/_/ // | \ \ \ |
@___@` \/_ // | \ \ \/\ \
@veob
veob / psql_naturalsort
Last active April 25, 2023 07:18
PostgreSQL natural sort
//sql
create or replace function naturalsort(text)
returns bytea language sql immutable strict as
$f$ select string_agg(convert_to(coalesce(r[2],length(length(r[1])::text) || length(r[1])::text || r[1]),'SQL_ASCII'),'\x00')
from regexp_matches($1, '0*([0-9]+)|([^0-9]+)', 'g') r; $f$;
//author: github.com/RhodiumToad
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples