Skip to content

Instantly share code, notes, and snippets.

View jkingsman's full-sized avatar
🇳🇿

Jack Kingsman jkingsman

🇳🇿
View GitHub Profile
@jkingsman
jkingsman / pride.sh
Created March 16, 2020 01:04
CLI Pride Flags
#!/bin/bash
###
# Basically, these all loop through an array of xterm colors (https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg)
# and then prints out the block character (█) in that color {1..N} times (aka width) (see printf wizardry explained: https://stackoverflow.com/a/5349842)
###
# philly pride/poc
for c in 232 232 130 130 196 196 202 202 226 226 46 46 021 021 126 126;do printf "\033[38;05;${c}m%0.s█" {1..50};echo;done;echo
@ata4
ata4 / moviebarcode.py
Last active July 24, 2023 16:02
Python 3 script to create movie barcodes with ffmpeg and imagemagick
#!/usr/bin/python
import sys, subprocess, getopt, os, json
def main(argv):
script_name = os.path.basename(argv[0])
try:
opts, args = getopt.getopt(argv[1:], "sw:h:q:", ["help", "solid-color", "width=", "height=", "samples="])
except getopt.GetoptError as err:
@edfungus
edfungus / pupil.py
Last active November 27, 2023 17:08
Pupil Detection with Python and OpenCV
#Identify pupils. Based on beta 1
import numpy as np
import cv2
import time
cap = cv2.VideoCapture(0) #640,480
w = 640
h = 480