Skip to content

Instantly share code, notes, and snippets.

View jfunction's full-sized avatar
:shipit:
Microsofts Github has status updates

Jared jfunction

:shipit:
Microsofts Github has status updates
View GitHub Profile
@jfunction
jfunction / simple.json
Created May 31, 2020 14:35
Simple JSON
{
"id": 10,
"name": "Chucho",
"surname": "Lopez"
}
@jfunction
jfunction / transform_mouse_coords
Created March 28, 2019 09:49
If the axis on your mouse screws up like mine did, you can move it left-right and see the counter-clockwise rotation required to make it horizontal, then up-down and see that rotation (degrees) then pass those to this script to get a linux cmd which will transform it accordingly.
#!/usr/bin/python3.7
from math import sin, cos, pi
import subprocess
import sys
skew_x_axis=int(sys.argv[1])
skew_y_axis=int(sys.argv[2]) # if when you move your mouse up it moves up and to the right leaving 10 degrees drift from the y axis, write 10 here
c=pi/180.
def get_rotation_matrix(xt, yt):