Skip to content

Instantly share code, notes, and snippets.

View mmmunk's full-sized avatar

Thomas Munk mmmunk

View GitHub Profile
akent /
Last active December 29, 2022 12:47
#!/usr/bin/env python3
# Based on py-slideshow by Corey Goldberg
# Copyright (c) 2013, 2015, Corey Goldberg
# Copyright (c) 2019-2020 Adam Kent
# Dev:
# License: GPLv3
import sys
import gi
gi.require_version('Clutter', '1.0')
gi.require_version('Gtk', '3.0')
gi.require_version('GtkClutter', '1.0')
from gi.repository import Clutter # isort:skip
from gi.repository import Gtk # isort:skip
leoloobeek /
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/ .
# python3 user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('{0}/gists'.format(user))
Soulstorm50 / Gallary
Created November 1, 2016 20:31
#include <windows.h>
#include <string>
#include "resource.h"
#include <vector>
#include <string>
#include <tchar.h>
#include <io.h>
using namespace std;
#pragma comment(linker, "\"/manifestdependency:type='win32' \
anonymous / google_cast_sample.htm
Created March 12, 2016 16:06
Google Cast (Chromecast) JavaScript API custom URL sender sample
<!DOCTYPE html>
<script src=''></script>
function onError() {
document.getElementById('message').innerHTML = 'Error';
window['__onGCastApiAvailable'] = function(loaded, errorInfo) {
ax003d /
Created August 12, 2015 14:53
tornado https server
import ssl
from tornado.httpserver import HTTPServer
from tornado.web import Application, RequestHandler
from tornado.ioloop import IOLoop
class TestHandler(RequestHandler):
def get(self):
self.write("Hello, World!\n")
jasonruyle /
Last active February 4, 2024 15:00
UFW to block countries
wandernauta / sp
Last active May 14, 2024 16:49
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
sahib /
Created May 4, 2013 19:56
Playing around with Python/Clutter/Gtk. Simple Swipe Effect.
from gi.repository import GLib, Gtk, GtkClutter, Clutter, Gdk, GdkPixbuf
import sys
from random import random
class ClutterBrowser(Gtk.ApplicationWindow):
import os.path
import sys
from gi.repository import Gtk, GdkPixbuf
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
path = sys.argv[1]