Skip to content

Instantly share code, notes, and snippets.

View einSelbst's full-sized avatar
💭
Me, looking through the window of opportunity.

einSelbst einSelbst

💭
Me, looking through the window of opportunity.
  • Berlin / BalticSea
View GitHub Profile
import unittest
from pyramid import testing
from paste.deploy.loadwsgi import appconfig
from webtest import TestApp
from mock import Mock
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from app.db import Session
@einSelbst
einSelbst / keybase.md
Last active August 29, 2015 14:07
keybase.md

Keybase proof

I hereby claim:

  • I am einselbst on github.
  • I am einselbst (https://keybase.io/einselbst) on keybase.
  • I have a public key whose fingerprint is 694B C050 2B07 FC53 48C9 FA5D AE04 2F71 026F 275A

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am einselbst on github.
  • I am silvioh (https://keybase.io/silvioh) on keybase.
  • I have a public key ASADDcgVq9A_5yp-Jo5AY_lL2XH5NzHMqWVf97MSFYVIOgo

To claim this, I am signing this object:

@einSelbst
einSelbst / sqlalchemy_conftest.py
Created March 14, 2018 12:19 — forked from kissgyorgy/sqlalchemy_conftest.py
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope='session')
def engine():
return create_engine('postgresql://localhost/test_database)
@einSelbst
einSelbst / siecje.py
Created March 27, 2018 12:06 — forked from doobeh/example.html
Checkbox WTForms Example (in Flask)
from flask import Flask, render_template
from flask.ext.wtf import Form, widgets, SelectMultipleField
SECRET_KEY = 'development'
app = Flask(__name__)
app.config.from_object(__name__)
class MultiCheckboxField(SelectMultipleField):
widget = widgets.ListWidget(prefix_label=False)
@einSelbst
einSelbst / yardoc_cheatsheet.md
Last active January 6, 2024 04:07 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@einSelbst
einSelbst / bitmexusd.user.js
Created September 12, 2019 01:51 — forked from AJolly/bitmexusd.user.js
BitMex USD Converter - For TemperMonkey
// ==UserScript==
// @name BitMex USD Converter
// @namespace https://bitmex.com/
// @version 0.13
// @description Get some sanity into your gambling.
// @author koinkraft, modified by @Jolly - https://www.twitter.com/Jolly
// @grant none
// @include https://bitmex.com/*
// @include https://www.bitmex.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
@einSelbst
einSelbst / bitmex-usd-converter.js
Last active June 2, 2021 13:47 — forked from QuantBits/script.js
BitMex USD Converter - For TemperMonkey
// ==UserScript==
// @name BitMex USD Converter
// @namespace https://bitmex.com/
// @version 0.14
// @description Get some sanity into your gambling.
// @author koinkraft, @Jolly, einSelbst
// @grant none
// @include https://bitmex.com/*
// @include https://www.bitmex.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
@einSelbst
einSelbst / iso-3166-country-codes.ts
Created August 23, 2022 22:46 — forked from OrderAndCh4oS/iso-3166-country-codes.ts
ISO 3166 Country Codes Typescript Object JSON
// https://www.iso.org/obp/ui/#search
const isoCountryCodes = [
{name: 'Andorra', alphaTwoCode: 'AD', alphaThreeCode: 'AND', numeric: '020'},
{name: 'United Arab Emirates', alphaTwoCode: 'AE', alphaThreeCode: 'ARE', numeric: '784'},
{name: 'Afghanistan', alphaTwoCode: 'AF', alphaThreeCode: 'AFG', numeric: '004'},
{name: 'Antigua and Barbuda', alphaTwoCode: 'AG', alphaThreeCode: 'ATG', numeric: '028'},
{name: 'Anguilla', alphaTwoCode: 'AI', alphaThreeCode: 'AIA', numeric: '660'},
{name: 'Albania', alphaTwoCode: 'AL', alphaThreeCode: 'ALB', numeric: '008'},
{name: 'Armenia', alphaTwoCode: 'AM', alphaThreeCode: 'ARM', numeric: '051'},
{name: 'Angola', alphaTwoCode: 'AO', alphaThreeCode: 'AGO', numeric: '024'},
@einSelbst
einSelbst / iso-639-1-lookup.json
Created August 23, 2022 22:47 — forked from OrderAndCh4oS/iso-639-1-lookup.json
iso-639-1 language code to iso-639-2 look up json
{
"ab": {
"iso-639-2": [
"abk"
],
"iso-639-1": "ab",
"english": "Abkhazian",
"french": "abkhaze",
"german": "Abchasisch"
},