Skip to content

Instantly share code, notes, and snippets.

View whimboo's full-sized avatar

Henrik Skupin whimboo

View GitHub Profile
@whimboo
whimboo / gist:79ae3e1b1d7ffd641773
Created March 11, 2016 11:49
Example trigger_ondemand job output for Marionette
[testrun]
script=update
target-revision=fb3494d06dfb
target-version=46.0b1#8
channel=beta-localtest
[windows xp 32bit]
platform=win32
45.0b6=en-US
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 / conftest.py
Created July 25, 2018 10:51
Missing marker in fixturenames for sub-fixture
import pytest
@pytest.fixture(name="fish")
def fixture_fish(taste):
pass
def pytest_generate_tests(metafunc):
if "taste" in metafunc.fixturenames:
@whimboo
whimboo / test_datetime.py
Created March 19, 2019 10:10
datetime snippet
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 / gist:216f4e8d990de7e895c1e3f1a8185538
Created March 14, 2021 09:59
PerfChaser reduce PNG file size
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}'