Skip to content

Instantly share code, notes, and snippets.

Avatar

Henrik Skupin whimboo

View GitHub Profile
View gist:216f4e8d990de7e895c1e3f1a8185538
https://squoosh.app/editor
npx @squoosh/cli --resize '{"enabled":true,"width":1024,"height":737,"method":"triangle","fitMethod":"stretch","premultiply":false,"linearRGB":false}' --quant '{"enabled":true,"zx":0,"maxNumColors":256,"dither":1}' --oxipng '{"level":3}'
View test_datetime.py
import datetime
date = datetime.datetime(2013, 7, 2, 0, 0)
has_time = date and date.time()
print("** has time: %s" % has_time)
if has_time:
print("** date: %s" % date.strftime('%H-%M-%S'))
else:
@whimboo
whimboo / conftest.py
Created Jul 25, 2018
Missing marker in fixturenames for sub-fixture
View conftest.py
import pytest
@pytest.fixture(name="fish")
def fixture_fish(taste):
pass
def pytest_generate_tests(metafunc):
if "taste" in metafunc.fixturenames:
View example_mro.py
class Process(object):
def __init__(self, group=None, target=None, name=None, *args, **kwargs):
print 'Process __init__'
print '* args: {}'.format(args)
print '* kwargs: {}'.format(kwargs)
class BlockingChannel(object):
def __init__(self, channel, *args, **kwargs):
super(BlockingChannel, self).__init__(*args, **kwargs)
@whimboo
whimboo / gist:79ae3e1b1d7ffd641773
Created Mar 11, 2016
Example trigger_ondemand job output for Marionette
View gist:79ae3e1b1d7ffd641773
[testrun]
script=update
target-revision=fb3494d06dfb
target-version=46.0b1#8
channel=beta-localtest
[windows xp 32bit]
platform=win32
45.0b6=en-US