Skip to content

Instantly share code, notes, and snippets.

@edfungus
edfungus / shortcuts.json
Created June 14, 2020 06:09
Vscode Shortcuts
[
{
"key": "ctrl+[",
"command": "workbench.action.navigateBack"
},
{
"key": "ctrl+]",
"command": "workbench.action.navigateForward"
},
{
@edfungus
edfungus / dell7390.ahk
Last active April 25, 2020 23:12
Autohotkey script for for better home/end/esc navigation for Dell XPS 7390
; Put in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
; 1 to 1 remaps
CapsLock::Esc
PgUp::Left
PgDn::Right
; ctrl remaps
; ctrl + [right, left, pageup, pagedown] => home or end
$^Left::
Keywait,Left
@edfungus
edfungus / bashit.theme.bash
Created November 16, 2017 07:20
My bashit theme
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX=" ${green}|"
SCM_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX=" ${green}|"
@edfungus
edfungus / sketch.ino
Created July 30, 2017 21:44
RBG LED strip with serial color and brightness control
#include "FastLED.h"
#include "EEPROM.h"
#define NUM_LEDS 37
#define DATA_PIN 7
#define addrHue 0
#define addrOnoff 2
// Define the array of leds
CRGB leds[NUM_LEDS];
@edfungus
edfungus / SerialLEDStrip.ino
Created April 7, 2017 03:53
Control led strip via serial
#include "FastLED.h"
#include "EEPROM.h"
// How many leds in your strip?
#define NUM_LEDS 37
#define DATA_PIN 7
#define addrHue 0
#define addrOnoff 2
// Define the array of leds
@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
@edfungus
edfungus / gist:0928815267cfbad5afa2
Last active August 29, 2015 14:07
Getting Mouse Click Event
##USE Xlib VERSION 14!!!! NOT 15!!!!
from pymouse import PyMouseEvent
class Clickonacci(PyMouseEvent):
def __init__(self):
PyMouseEvent.__init__(self)
def click(self, x, y, button, press):
if button == 1:
@edfungus
edfungus / gist:8da9baa0a04aa6d59177
Created September 14, 2014 03:37
OpenCV - eye tracking of webcam video
import numpy as np
import cv2
import time
cap = cv2.VideoCapture(0) #640,480
w = 640
h = 480
while(cap.isOpened()):
ret, frame = cap.read()