Skip to content

Instantly share code, notes, and snippets.

View marczellm's full-sized avatar

Márton Marczell marczellm

View GitHub Profile
@marczellm
marczellm / youtube_opener.py
Created March 27, 2019 21:20
Open Youtube links (vnd-youtube:) from Messenger on Windows
# -*- coding: utf-8 -*-
import sys
import webbrowser
import json
from urllib.parse import urlparse, unquote, parse_qs
vndurl = sys.argv[1].replace('vnd.youtube', 'https')
if vndurl.startswith('https://www.youtu') or vndurl.startswith('https://youtu'):
webbrowser.open(vndurl)
else:
@marczellm
marczellm / convert_locales.py
Created February 23, 2018 22:01
Convert Firefox extension locale files to WebExtension format
from pathlib import Path
from configparser import ConfigParser
import json
old = Path('locale')
new = Path('_locales')
class FakeSecHead:
def __init__(self, fp):
self.fp = fp
@marczellm
marczellm / pydesktopsearch.py
Last active April 28, 2018 19:41
Google Desktop replacement
import ctypes
import keyboard
import tkinter as tk
import urllib.parse
import webbrowser
from threading import Thread
class Wnd:
def __init__(self, hotkey_state):