Skip to content

Instantly share code, notes, and snippets.

@cobryan05
cobryan05 / webcamDetect.py
Last active April 22, 2024 11:40
Query registry for active webcam
# 2024-04-17: Stole changese from @Timmo on stackoverflow to get this working with Windows Apps
import winreg
class WebcamDetect:
REG_KEY = winreg.HKEY_CURRENT_USER
WEBCAM_REG_SUBKEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\webcam\\"
WEBCAM_TIMESTAMP_VALUE_NAME = "LastUsedTimeStop"
def __init__(self):
@palfrey
palfrey / zero-punctuation.py
Last active September 25, 2015 00:48
Zero Punctuation downloader
#!/usr/bin/python
from urlgrab import Cache
from BeautifulSoup import MinimalSoup as BeautifulSoup
from re import compile
from os.path import exists, getsize, dirname, join
from urllib import urlretrieve, urlencode, quote
from sys import argv
import demjson
import zlib
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v