Skip to content

Instantly share code, notes, and snippets.

@daveriedstra
daveriedstra / evdev-3fd.py
Created February 9, 2019 03:21
smoother three-finger drag on linux using python-evdev
#!/usr/bin/env python3
from evdev import ecodes as e, InputDevice, UInput, categorize
# NTS - if opening /dev/uinput doesn't work,
# sudo chmod 666 /dev/uniput
# sudo modprobe uinput
# todo - get this from a config file
dev_name = '/dev/input/event14'
@daveriedstra
daveriedstra / loadModules.ts
Last active January 13, 2017 23:51
A way to guess and load modules before bootstrapping angular
/**
This module exports one function, loadModules, which guesses then downloads the modules
which need to be loaded before bootstrapping the application. loadModules() returns an
array of Promises which can be waited on using Promise.all.
The guessing process can handle
- normal loader as route.loadChildren
- redirect as route.redirectTo
- nested lazy loaders using route.data.alsoLoad*