Skip to content

Instantly share code, notes, and snippets.

View flub's full-sized avatar
💭
¯\_(ツ)_/¯

Floris Bruynooghe flub

💭
¯\_(ツ)_/¯
View GitHub Profile
@flub
flub / get_apps_test.py
Created April 28, 2022 16:09
Script to test App Store Connect credentials as they are used by sentry.
"""Test credentials.
Instructions:
- Paste in the KEY_ID, KEY, and ISSUER_ID.
- Install dependencies: ``pip install requests pyjwt[crypto]``
- Run: ``python get_apps_test.py``
"""
import http.client

Keybase proof

I hereby claim:

  • I am flub on github.
  • I am flub (https://keybase.io/flub) on keybase.
  • I have a public key whose fingerprint is 0FB1 803B C91D 1B60 1E2A 2C22 702A 26DB 4CCB 3FFC

To claim this, I am signing this object:

# -*- coding: utf-8 -*-
"""Generic host information"""
from __future__ import (absolute_import,
unicode_literals, print_function, division)
import abc
@flub
flub / gist:6365845
Last active December 21, 2015 21:08
greenlet solaris crasher Upon interrupting this (^C) this crashes reliably: $ pybin/bin/python test2.py ^CException in thread Thread-14: Traceback (most recent call last): File "/export/home/flub/issue546/greenlet-issue14/pybin/lib/python2.7/threading.py", line 551, in __bootstrap_inner self.run() File "test2.py", line 23, in run gt.switch() Sys…
import sys
import threading
import time
import greenlet
sys.setcheckinterval(0)
@flub
flub / greenlet_issue14_test.py
Created June 21, 2012 09:10
Demo script which makes greenlet raise SystemError
import random
import sys
import threading
import time
import dpkt
import eventlet
import eventlet.xthread
from eventlet.green import socket
@flub
flub / pytest_django.py
Created June 1, 2012 13:24
pytest-django experiment
"""pytest plugin for testing django projects
This plugin handlers creating and destroying the test environment and
database. It is only enabled when DJANGO_SETTINGS_MODULES is set in
either the environment, the ini file or a conftest.py file. In case
of conftest.py files the django modules are only imported at the last
possible moment and it is also possible to test multiple sites
(multiple django settings modules) in one py.test process.
Similar to Django's TestCase, a transaction is started and rolled back