Skip to content

Instantly share code, notes, and snippets.

View superMDguy's full-sized avatar

Matthew Dangerfield superMDguy

View GitHub Profile
@superMDguy
superMDguy / sortable-dnd.util.js
Last active December 12, 2022 20:13
SortableJS drag and drop testing utilities for cypress
// Cypress-ized and modified version of https://github.com/kemokid/scripting-sortable/blob/master/script_sortable_dnd.js
export function triggerSortableDragAndDrop(elemDrag, elemDrop) {
/*
Summary of what events this fires:
On elemDrag:
mouseDown
dragstart
On elemDrop:
dragover (repeat until it moves)
@cyberang3l
cyberang3l / How to setup VirtualGL and TurboVNC on Ubuntu.md
Last active August 22, 2025 06:33
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
var subscribers = []
var activeJob = null
var a = 3
var state = {
get a () {
if(subscribers.indexOf(activeJob) < 0){
subscribers.push(activeJob)
}
return a
@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@bot11
bot11 / Gstreamer
Last active January 12, 2022 03:41
Gstreamer notes
Lets say:
IP Address of Raspberry: 192.168.0.106
IP Address of ubuntu Desktop: 192.168.0.103
IP Address of remote linux server to copy image files: 192.168.0.200
1) On Raspberry pi , run the camera and stream using gstreamer as below:
raspivid -t 0 -w 800 -h 600 -fps 25 -g 5 -b 4000000 -vf -n -o - | gst-launch -v fdsrc ! h264parse ! gdppay ! tcpserversink host=192.168.0.106 port=5000
2) On Ubuntu desktop, run the local rtsp server as below:
@Tafkas
Tafkas / rmsle.py
Created November 25, 2013 14:37
Compute the Root Mean Squared Log Error for hypothesis h and targets y
import numpy as np
def rmsle(h, y):
"""
Compute the Root Mean Squared Log Error for hypthesis h and targets y
Args:
h - numpy array containing predictions with shape (n_samples, n_targets)
y - numpy array containing targets with shape (n_samples, n_targets)
"""
@stober
stober / rargmax.py
Created February 29, 2012 18:46
Random Argmax in Python
#!/usr/bin/env python
"""
Author: Jeremy M. Stober
Program: RARGMAX.PY
Date: Wednesday, February 29 2012
Description: Simple rargmax function.
"""
import numpy as np