Skip to content

Instantly share code, notes, and snippets.

@GluTbl
GluTbl / Hide_focus_in_edit_text.kt
Last active March 26, 2020 15:25
[Hide focus in edit text] #Kotlin
private fun hidefocus(v:View?) {
try {
val imm =getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
if (v != null) {
imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS)
}
} catch (ignored: Exception) {
}
edit_port.setSelected(false)
@GluTbl
GluTbl / website_update_checker.py
Last active March 29, 2021 07:57
[Website Update Checker] Detect any change in website
from time import sleep
import playsound
import requests
old = b""
filestring = "old_data_request.txt"
def getRequest():
@GluTbl
GluTbl / ContactJsonFacebookBackupToVcf.py
Last active March 26, 2020 15:18
[Facebook backup to VCF] Extract contacts from backup of facebook to .vcf files #facebook
import json
def readbyte(fileloc: str):
in_file = open(fileloc, "rb") # opening for [r]eading as [b]inary
data = in_file.read() # if you only wanted to read 512 bytes, do .read(512)
in_file.close()
return data
def get_vcfstring(person):
@GluTbl
GluTbl / ESP32 as Bluetooth Keyboard
Last active March 26, 2020 15:23 — forked from manuelbl/README.md
[ESP32 as Bluetooth Keyboard] #ESP32
# ESP32 as Bluetooth Keyboard
With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.
For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.
In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:
1. Go to your computers/phones settings
2. Ensure Bluetooth is turned on
@GluTbl
GluTbl / Git commands
Last active March 26, 2020 15:19
[Git's commands] #github #git
https://stackoverflow.com/questions/50796204/overwrite-master-with-develop
@GluTbl
GluTbl / Node MCU pinmap
Last active July 24, 2020 12:51
[ESP8266 Pinout] Generic ESP8266 Module blinking inbuilt led #esp8226
Node MCU pinmap
D0- GPIO16
D1- GPIO5
D2- GPIO4
D3- GPIO0
D4- GPIO2
D5- GPIO14
D6- GPIO12
D7- GPIO13
@GluTbl
GluTbl / __init__.py
Created March 27, 2020 12:10
[Eventghost Cpu Temp plugin]
import threading
from time import sleep
import eg
import wx.lib.scrolledpanel as scrolled
eg.RegisterPlugin(
name="WMI Ghostly",
author="Glu",
guid="{1B1428D4-86BC-4A4E-941F-A90125262613}",
version="0.1.1",
@GluTbl
GluTbl / gamepad.py
Created April 10, 2020 16:39
HID gamepade move detect
import time
from time import sleep
from pynput.mouse import Listener,Button, Controller
mouse = Controller()
def on_move(x, y):
global p1
p1=mouse.position
return False
@GluTbl
GluTbl / __init__.py
Last active April 16, 2020 18:18
TCPHandler #Eventghost
import eg
import json
import socket
import threading
from threading import Event, Thread
import wx.lib.scrolledpanel as scrolled
eg.RegisterPlugin(
name="TCP handler",
author="Glu",