Skip to content

Instantly share code, notes, and snippets.

@gndu91
gndu91 / simulate.py
Created December 27, 2017 11:23 — forked from wgm89/simulate.py
python simulate keybord
import ctypes
LONG = ctypes.c_long
DWORD = ctypes.c_ulong
ULONG_PTR = ctypes.POINTER(DWORD)
WORD = ctypes.c_ushort
class MOUSEINPUT(ctypes.Structure):
_fields_ = (('dx', LONG),
('dy', LONG),
@gndu91
gndu91 / ctype_async_raise.py
Created April 2, 2018 13:46 — forked from liuw/ctype_async_raise.py
Nasty hack to raise exception for other threads
#!/usr/bin/env python
# liuw
# Nasty hack to raise exception for other threads
import ctypes # Calm down, this has become standard library since 2.5
import threading
import time
NULL = 0
@gndu91
gndu91 / .gitignore
Created January 31, 2019 11:42 — forked from chichunchen/.gitignore
Git ignore binary files
# Ignore all
*
# Unignore all with extensions
!*.*
# Unignore all dirs
!*/
### Above combination will ignore all files without extension ###
@gndu91
gndu91 / temperature.sh
Last active July 21, 2021 00:11 — forked from corneliusroemer/temperature.sh
Get list and temperature of CPU and battery temperature sensors via Android Debug Bridge
#run from terminal with: adb shell "$(cat temperature.sh)" to get list of temperature sensors and their temperature
#on Android devices
for VARIABLE in $(seq 1 80)
do
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/type
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/temp
done
@gndu91
gndu91 / ddnsserver.py
Created October 17, 2021 08:27 — forked from pklaus/ddnsserver.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading