Skip to content

Instantly share code, notes, and snippets.

@miracle2k
miracle2k / .block
Created December 21, 2020 00:23 — forked from johnburnmurdoch/.block
Watercolour affect using HTML5 canvas
license: mit
height: 620
scrolling: no
border: no
@miracle2k
miracle2k / .block
Last active December 21, 2020 00:21 — forked from johnburnmurdoch/.block
Tool for creating virtual spray paint / masking tape art
height: 700
# Tweak the existing Logging integration to work with Logbook.
# Mostly copy-paste from https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/logging.py
#
# Usage:
#
# StreamHandler(sys.stdout, level="INFO").push_application()
# SentryErrorHandler(bubble=True, level='ERROR').push_application()
# SentryBreadcrumbHandler(bubble=True, level='INFO').push_application()
#
@miracle2k
miracle2k / jsonalchemy.py
Last active March 26, 2021 05:19 — forked from dbarnett/jsonalchemy.py
Support Raw json objects, OrderedDict, dates.
import json
import sqlalchemy
from sqlalchemy import UnicodeText
from sqlalchemy.ext.mutable import Mutable
from datetime import datetime
from collections import OrderedDict
__all__ = ('JSON', 'JsonRaw')
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
// When logged in, go to "Settings > Checkout > Checkout Language", click the "View and customize this translation" link.
// A page with a url like this opens: "https://yourshop.myshopify.com/admin/settings/locales/[locale_id]".
// copy [locale_id].
// Go Back and choose "create a new one".
// Open the Javascript console, paste this (change to your shop/locale_id first):
@miracle2k
miracle2k / toast.py
Created November 17, 2012 04:45 — forked from sveetch/toast.py
Testing a bug with webassets
"""
Usage with the following directory structure : ::
sources/
js/
css/
images/
_build/
static/
css/
@miracle2k
miracle2k / ServerRack.py
Created April 22, 2012 12:47 — forked from denik/ServerRack.py
class for managing multiple servers in gevent
class ServerRack(object):
"""Manages multiple gevent Servers. Works with anything that has
start() and stop() methods.
Adapted from:
https://gist.github.com/1008826
"""
def __init__(self):
self._servers = []