This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function <?:27,31> (25 instructions at 0x563b8aad94d0) | |
0 params, 17 slots, 1 upvalue, 0 locals, 7 constants, 0 functions | |
1 [-] GETTABUP 0 0 -1 ; - "sv_animcmd" | |
2 [-] GETTABLE 0 0 -2 ; "is_excute" | |
3 [-] CALL 0 1 2 | |
4 [-] TEST 0 0 | |
5 [-] JMP 0 19 ; to 25 | |
6 [-] GETTABUP 0 0 -1 ; - "sv_animcmd" | |
7 [-] GETTABLE 0 0 -3 ; "LANDING_EFFECT" | |
8 [-] LOADK 1 -4 ; 85833409598 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
struct pkx_header | |
{ | |
uint32_t magic1; | |
uint32_t magic2; | |
uint32_t magic3; | |
uint32_t type; | |
uint32_t comp_size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import struct | |
import sys | |
import hashlib | |
from pyasn1_modules import rfc2437,rfc2459 | |
from pyasn1.codec.der import decoder | |
from pyasn1.codec.native import encoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# copy to /usr/sbin | |
interface=org.chromium.PowerManager | |
member=SetPolicy | |
# Run once just to be sure | |
echo "Surface Go fix daemon start..." > /dev/kmsg | |
echo "on" > /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/power/control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imageio | |
import numpy as np | |
import cv2 | |
q = "20191230_221836_HDR.jpg" | |
r = "legs.png" | |
im = np.array(imageio.imread(r)) | |
im_orig = im | |
dims = im.shape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r /home/maxamillion/workspace/qt5_compare/qt-everywhere-src-5.12.2/qtbase/src/android/jar/src/org/qtproject/qt5/android/QtNative.java ./qtbase/src/android/jar/src/org/qtproject/qt5/android/QtNative.java | |
491a492,495 | |
> float tiltRot = event.getAxisValue(MotionEvent.AXIS_TILT); | |
> float orientation = event.getAxisValue(MotionEvent.AXIS_ORIENTATION); | |
> float tiltX = (float) Math.toDegrees(-Math.sin(orientation) * tiltRot); | |
> float tiltY = (float) Math.toDegrees(Math.cos(orientation) * tiltRot); | |
493c497 | |
< event.getButtonState(), event.getX(), event.getY(), event.getPressure()); | |
--- | |
> event.getButtonState(), event.getX(), event.getY(), event.getPressure(), tiltX, tiltY, (float)Math.toDegrees(orientation)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# OpenOCD configuration for Tegra X1 (T210) | |
# by shinyquagsire23 | |
# For use on Jetson Nano/TX1 and similar | |
# | |
transport select jtag | |
adapter speed 3000 | |
reset_config trst_and_srst | |
jtag_ntrst_delay 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run `ulimit -n 94000` or it'll run out of socket fd's | |
# grab your bee movie script from | |
# https://gist.githubusercontent.com/ElliotGluck/64b0b814293c09999f765e265aaa2ba1/raw/79f24f9f87654d7ec7c2f6ba83e927852cdbf9a5/gistfile1.txt | |
# and save as `beemovie.txt` | |
import time | |
import threading | |
import socket | |
import struct | |
connections = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires pyusb | |
import usb.core | |
import usb.util | |
import struct | |
import time | |
# Requires doing something like this before running, otherwise Linux kernel has control of the drive | |
# echo 1-1:1.0 > /sys/bus/usb/drivers/usb-storage/unbind | |
# find our device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import imageio | |
import numpy as np | |
import sys | |
if len(sys.argv) < 2: | |
print ("Usage: image-extract.py [imgdata.image]") | |
exit(0) | |
f = open(sys.argv[1], "rb") |