Skip to content

Instantly share code, notes, and snippets.

View eddyizm's full-sized avatar
🐍
one more project

eddyizm eddyizm

🐍
one more project
View GitHub Profile
@mikeckennedy
mikeckennedy / turnstile.py
Last active September 26, 2024 18:50
Python code for server-side Cloudflare validation (paired with client-side Cloudflare code)
# See details about Turnstile at https://blog.cloudflare.com/turnstile-private-captcha-alternative/
from typing import Optional
import pydantic
import requests
cloudflare_secret_key: Optional[str] = None
@rdapaz
rdapaz / win32com.client.py
Last active May 23, 2024 07:03
Fix for module win32com.gen_py has no attribute 'CLSIDToPackageMap'
# If errors are found, do this
# clear contents of C:\Users\<username>\AppData\Local\Temp\gen_py
# that should fix it, to test it type
import win32com.client
app = win32com.client.gencache.EnsureDispatch('Word.Application')
app.Visible = True
@vinovator
vinovator / OutlookMailer.py
Last active February 3, 2021 07:46
Sending mail from local machine using Python and win32com.client library
# OutlookMailer.py
# Python 2.7.6
import win32com.client as com
outlook = com.Dispatch("Outlook.Application")
"""
Source - https://msdn.microsoft.com/en-us/library/office/ff869291.aspx
Outlook VBA Reference
@pretorh
pretorh / Listing watched files on kodi (xbmc).md
Last active May 23, 2022 16:58
Listing watched files on kodi (xbmc)

Listing watched files on kodi (xbmc)

To list the full path of all watched files that are still accessable: (assuming the sql query was saved to list-watched-files.sql)

sqlite3 ~/.kodi/userdata/Database/MyVideos90.db < list-watched-files.sql | xargs -L 1 -I filename ls "filename" 2>/dev/null

Explanation

Get the list of watched files from the Kodi database

Kodi uses sqlite databases, located in ~/.kodi/userdata/Database/. The video database is MyVideosXX.db, where XX is the version (MyVideos90.db on OSMC on 2015-05-09)

@dominicthomas
dominicthomas / ffmpeg wav -> mp3
Created October 7, 2014 09:30
Convert a wav to a 320k mp3 using ffmpeg.
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3
@P4
P4 / default.reg
Last active October 5, 2024 01:35
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE