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
@einSelbst
einSelbst / php languages array
Created August 23, 2022 23:06 — forked from rafasashi/php languages array
PHP var_export of 180+ languages with data including name, native, iso codes, language family, language script, language cultures, and other attributes
array (
'aa' =>
array (
'name' => 'Afar',
'native' => 'Afaraf',
'iso_639_1' => 'aa',
'iso_639_2' => 'aar',
'iso_639_3' => 'aar',
'script' =>
@einSelbst
einSelbst / iso-639-2-lookup.json
Last active August 23, 2022 22:48 — forked from OrderAndCh4oS/iso-639-2-lookup.json
iso-639-2 language code to iso-639-1 look up json
{
"abk": {
"iso-639-2": "abk",
"iso-639-1": "ab",
"english": "Abkhazian",
"french": "abkhaze",
"german": "Abchasisch"
},
"ace": {
"iso-639-2": "ace",
@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"
},
@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 / 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 / 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 / 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 / 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 / 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)

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: