Skip to content

Instantly share code, notes, and snippets.

View HendrikRoth's full-sized avatar

Hendrik Roth HendrikRoth

  • Raphael GmbH
  • Dusseldorf, Germany
View GitHub Profile
@srlemke
srlemke / SimHub on Linux
Last active April 27, 2026 07:55
SimHub on Linux
Update 02.Apr.2026:
I made a script that will do all the needed checks and install SimHub:
https://github.com/srlemke/SimHub_on_Linux
There is also a V2 in the works that also can install CrewChief:
https://github.com/srlemke/SimHub_on_Linux/tree/With-Crewchief
Automatically adds and configures plugins for LMU, it also detects custom Proton.
Automatically adds dash.exe when Raceroom.
Fixes common issues, like removal of dotnet4 Steam stub
@webcss
webcss / eventsmixin.js
Last active August 9, 2016 12:44
PubSub mixin using CustomEvents
// utilizes the browser eventsystem
// usefull in cases where you need communication between independent components
// registered events are automatically removed onunload with preserving any other onunload handler
var eventsMixin = function(target) {
var _subscriptions = [];
target.broadcast = function(type, payload) {
var ev = new CustomEvent(type, {
detail: payload,
@webcss
webcss / mithril-touch.js
Last active May 26, 2020 15:34
mithril-touch, consume touch and mouse events evenly with mithril
/*****************************************
/* DOM touch support module
/*****************************************/
if (!window.CustomEvent) {
window.CustomEvent = function (event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
@jfromaniello
jfromaniello / gist:8418116
Last active September 19, 2023 23:38
Example of authenticating websockets with JWTs.
var WebSocketServer = require('ws').Server;
var wss = new WebSocketServer({port: 8080});
var jwt = require('jsonwebtoken');
/**
The way I like to work with 'ws' is to convert everything to an event if possible.
**/
function toEvent (message) {
try {