Skip to content

Instantly share code, notes, and snippets.

View krs013's full-sized avatar

Kristian Sims krs013

View GitHub Profile
@aaronNGi
aaronNGi / newscript.sh
Created April 28, 2020 20:38
Boilerplate for new POSIX shell scripts
#!/bin/sh
prog_name=${0##*/}
version=1.0
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
@brimston3
brimston3 / vector_voice_commands.mkd
Last active May 13, 2019 19:29
Anki Vector voice commands

"Hey Vector" Voice Commands

  • Go to sleep, Good night
  • Hello
  • Good [morning / afternoon / evening]
  • Goodbye
  • What time is it?
  • Go home, Go to your charger
@dloscutoff
dloscutoff / tinylisp.py
Last active April 20, 2022 20:42
Reference implementation of the original tinylisp language
#!/usr/bin/env python3
whitespace = " \t\n\r"
symbols = "()"
# Shortcut function for print without newline
write = lambda x: print(x, end="")
def scan(code):
i = 0
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten