Skip to content

Instantly share code, notes, and snippets.

View petronny's full-sized avatar

Jingbei Li petronny

View GitHub Profile
@bartoszek
bartoszek / git_submodule_PKGBUILD_conf.sh
Last active April 25, 2023 08:40
PKGBUILD: generate git submodule configuration.
#!/bin/bash
# shellcheck disable=SC2164,SC2154 # mask unsafe cd and uninitialized variables warings
shopt -s globstar
# How to use:
# * run in PKGBUILD dir or pass path to PKGBUILD as argument
# this will generate volatile source tree in $TMP (default: /tmp) and
# generate source array and prepare_submodule() function to init them
# * add local=1 env var to use src/ dir in PKGBUILD path instead of $TMP
# * add remote=1 env var to update module past the pined commit hash
@Fortyseven
Fortyseven / QSORT.PAS
Created September 27, 2014 14:53
An implementation of QuickSort provided by Borland with Turbo Pascal.
{ Turbo Sort }
{ Copyright (c) 1985,90 by Borland International, Inc. }
program qsort;
{$R-,S-}
uses Crt;
{ This program demonstrates the quicksort algorithm, which }
{ provides an extremely efficient method of sorting arrays in }
{ memory. The program generates a list of 1000 random numbers }