Skip to content

Instantly share code, notes, and snippets.

@oddstr13
oddstr13 / keybase.md
Last active September 20, 2015 02:01

Keybase proof

I hereby claim:

  • I am oddstr13 on github.
  • I am oddstr13 (https://keybase.io/oddstr13) on keybase.
  • I have a public key whose fingerprint is 064E 5F03 6F57 151B D841 AC7F 1E25 D2F7 8255 4AE6

To claim this, I am signing this object:

#!/usr/bin/python2
import socket
import time
dump_state = []
# rigctld protocol version
dump_state.append( b"0" )
# rig model
dump_state.append( b"1" )
#!/usr/bin/env python
import socket
TCP_IP = 'ukhas.net'
TCP_PORT = 3010
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
@oddstr13
oddstr13 / laser_pwm_testpattern.jl
Created September 30, 2017 18:23
Generates a pattern for testing laser PWM functionality
function readnumber(::Type{T}, default=nothing, prompt=nothing) where T<:Number
while true
if prompt == nothing
prompt = "$T>"
end
if default == nothing
print("$prompt> ")
else
print("$prompt ($default)> ")
set __COMPAT_LAYER=RUNASINVOKER
start "Black Desert Online" "Black Desert Online Launcher.exe"
@oddstr13
oddstr13 / find_matches.py
Last active July 17, 2024 15:19
Python OpenCV ImageHash
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) Odd Stråbø <[email protected]>
#
import os
from opencv_test import Session, Image, Hash, HASHERS
from gmpy2 import hamdist
@oddstr13
oddstr13 / _etc_init.d_telegraf
Created September 19, 2018 21:36
telegraf OpenWRT procd init script
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
PROG=/usr/bin/telegraf
config=/etc/telegraf/telegraf.conf
confdir=/etc/telegraf/telegraf.d
define(['inputmanager'], function(inputmanager) {
'use strict';
console.log("keyboardnavigation");
document.addEventListener('keydown', function(e) {
console.log(e);
console.log(e.code);
console.log(e.key);
console.log(e.view);