Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
creative coding, probably

Alex Hall earthbound19

🚀
creative coding, probably
View GitHub Profile
@earthbound19
earthbound19 / processing_recursive_combination_function.pde
Last active Feb 28, 2021
Processing (Java) recursive combination finder function, adapted
View processing_recursive_combination_function.pde
// Processing/Java example of function that prints strings of all possible combinations of size howManyToSelect from an ArrayList<Integer>.
// Also, it constructs an ArrayList of ArrayLists of integers, with is a list of all possible combinations. Because I want this
// in Processing for my prototyping and generative art purposes. Because I am insane.
// ADDENDUM: GitHub doesn't wrap the text in the viewbox despite my just setting a toggle to do so.
// To read many comments you may need to view/copy the raw source.
// Disclaimer: I could not explain how this works. I hacked a black box function I found until it did what I want.
// This is a a recursive function (it calls itself). Adapted from: https://hmkcode.com/calculate-find-all-possible-combinations-of-an-array-using-java/
// other implementations of this or other combinatronics algorithms: https://stackoverflow.com/a/29914908/1397555 -- https://www.geeksforgeeks.org/print-all-possible-combinations-of-r-elements-in-a-given-array-of-size-n/
View example_git_flow_QA_and_release_management_checklist.md

The following example code, QA and release management checklist assumes a git branching model like this:

  • master branch is protected, and changes least frequently, only when develop is merged into it.
    • develop branch is protected, and changes infrequently, and ideally only when feature and release branches off it are merged into it.
      • variously named release branches, branched off develop, finalized as various feature/fix branches off it are marged into it.
        • (optional, depending on number of developers on the release and need) variously named feature/fix branches off release branches, frequently made and merged into a release branch.

Also, a kanban or similar project management series of columns like the following may help track issues through the process. QA may move failed items back from "QA this" to "coding" to signal programmers that a fix or new feature failed (with detailed notes on the failure mode) :

`backlog | up next (or current sprint) | in progress | ready for QA | QA pa

@earthbound19
earthbound19 / randomFloatsInRange.c
Last active Jul 5, 2020
C randomFloatInRange executable
View randomFloatsInRange.c
// DESCRIPTION
// Generates N (argv[3]) floating point numbers in range argv[1] to argv[2]. Depending on system and setup may be able to produce ~35,000N/sec.
// USAGE
// Compile for example via gcc, like this (I use an MSYS2-MinGW-64 terminal) :
// gcc randomFloatsInRange.cpp -o randomFloatsInRange.exe
// -- and then invoke the resulting executable with these parameters (POSITIONAL, not named):
// - 1. smallest possible random number to generate. I don't know the minimum; certainly 0 is allowed.
// - 2. largest possible random number to generate. Maximum may be RAND_MAX; on my system that is: 2147483648.000000.
// - 3. how many such numbers to generate. I don't know the maximum.
@earthbound19
earthbound19 / ripDataSingingClip.txt
Created Jun 30, 2020
extract clip of Data singing about life forms from extracted .vob of STAR TREK: GENERATIONS DVD
View ripDataSingingClip.txt
ffmpeg -y -i VTS_01_3.vob -ss 00:06:07.300 -t 00:00:36.690 -map 0:v -vcodec copy -map 0:a -acodec copy out.mp4
@earthbound19
earthbound19 / keybase.md
Created Jul 23, 2019
proof of keybase ID
View keybase.md

Keybase proof

I hereby claim:

  • I am earthbound19 on github.
  • I am earthbound (https://keybase.io/earthbound) on keybase.
  • I have a public key ASADgnQddBl7U3g8jIoKNm960AG5_uqHvT3DipIHxZQJego

To claim this, I am signing this object:

View mondrian.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mondrian Generator</title>
<script src="https://d3js.org/d3.v4.js" charset="utf-8"></script>
<style>
</style>
</head>
<body>
@earthbound19
earthbound19 / getBitcoinPurchasingPowerParity.sh
Last active Jul 12, 2017
Get current list of Big Mac purchasing power per Bitcoin (by average of countries and by country)
View getBitcoinPurchasingPowerParity.sh
curl http://bitcoinppi.com/v1.1/spot.csv > Bitcoin_Purchasing_Power_Parity_spot.csv
curl http://bitcoinppi.com/v1.1/spot_countries.csv > Bitcoin_Purchasing_Power_Parity_spot_countries.csv
# Re: http://bitcoinppi.com/pages/api - http://bitcoinppi.com/ - https://news.bitcoin.com/bitbond-new-big-mac-index-gives-bitcoin-tangible-value-by-association/ - https://en.wikipedia.org/wiki/Big_Mac_Index
@earthbound19
earthbound19 / Our Romatic Diamond-Gemstone-Heart-300px-png-loop100x-mp4.bat
Created Jul 3, 2016
Commands to encode a super cheesy music file with a super cheesy looped source image, via ffmpeg
View Our Romatic Diamond-Gemstone-Heart-300px-png-loop100x-mp4.bat
ffmpeg -y -loop 1 -f image2 -i Diamond-Gemstone-Heart-300px.png -i "Our Romatic.mp3" -shortest -r 29.97 -crf 40 1.mp4
echo file '1.mp4' > concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
echo file '1.mp4' >> concat.txt
@earthbound19
earthbound19 / mediaWikiColorTableSort.sh
Last active Jan 30, 2016
Sorts mediaWiki color tables descending in HSL values, using Cygwin (~'nix) sed and sort.
View mediaWikiColorTableSort.sh
# DESCRIPTION
# Sorts mediaWiki color tables by priority of columns H(ue), S(aturation), L(ightness), descending, using Cygwin (~'nix) sed and sort.
# USAGE
# Call this script with one parameter, being the text file to sort, *inline* -- meaning, THIS WILL DIRECTLY MODIFY whatever text file you pass to it.
## CODE
if [ -a $1_.bk ]
then
echo ~-~-~-~- Backup of input file $1 already exists. Will not execute. Check if the file you passed to this script is already in the state you wish. If not, delete the backup file and run this script against $1 again. ~-~-~-~-
else
@earthbound19
earthbound19 / RandomBunniesInterjection.ahk
Created Mar 4, 2015
Replaces the letter 'b' with the word "bunnies!" at a random chance (for everything you type on your computer--it is a global keyboard hook), which chance interval you may set by modifying this script and recompiling it. As is, 1 in 13 times you type b or B, it so afflicts or entertains you and/or your victim. Alternate hex source code provided …
View RandomBunniesInterjection.ahk
This file has been truncated, but you can view the full file.
; I release this into the Public Domain. 03/03/2015 05:17:38 PM -RAH
; An AutoHotkey script which randomly replaces the letter 'b' with the word "bunnies!" at a random chance (for everything you type on your computer--it is a global keyboard hook), which chance interval you may set by modifying this script and recompiling it. As is, 1 in 13 times you type b or B, it so afflicts or entertains you and/or your victim.
; If you'd like to create this file without installing AutoHotkey, and you trust me, you can download and install HxD Hex Editor freeware from:
;http://mh-nexus.de/en/hxd/
; -- then create a new blank document with it, paste in the hexadecimal source code provided in the below hexcode dump comment, save it as an .exe, and see whether it destroys your soul and/or the computer. Otherwise, install AutoHotkey, save this source code as a .ahk file, right-click it, and "compile."