- DEB https://packages.gitlab.com/app/runner/gitlab-runner/search?q=gitlab-runner_11.9.2&dist=ubuntu%2Fxenial
- RPM https://packages.gitlab.com/app/runner/gitlab-runner/search?q=gitlab-runner-11.9.2&filter=all&dist=el%2F7
Custom CA Certs
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Boolean, String | |
from sqlalchemy.orm import sessionmaker | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
session = sessionmaker(bind=engine)() | |
Base = declarative_base() | |
class User(Base): |
# Updated from these out of date docs. | |
# https://pika.readthedocs.io/en/stable/examples/tornado_consumer.html | |
from pika.adapters.tornado_connection import TornadoConnection | |
import pika | |
import logging | |
import coloredlogs | |
coloredlogs.install() |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} | |
body { | |
color: #444; | |
font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; |
from tarfile import TarFile, TarInfo, open as OpenTarfile | |
from tempfile import NamedTemporaryFile, TemporaryDirectory | |
import shutil | |
file_data = [ | |
(b'1239EAD09123FCC', "/data/local/tmp/me"), | |
(b'aaaaaaaaaaaaaaa', "/data/local/tmp/a"), | |
(b'bbbbbbbbbbbbbbb', "/data/local/tmp/b") | |
] |
#!/usr/bin/python3.7 | |
# pytest -s test_subapps.py | |
# pip install pytest aiohttp pytest-aiohttp | |
from aiohttp import web | |
import pytest | |
def handle_1(request): | |
return web.Response(text="OK 1") |
from subprocess import check_output | |
from datetime import datetime | |
ms_since_epoch = check_output([ | |
"node", | |
"-e", | |
"console.log(require('moment')().valueOf())" | |
]) | |
dt = datetime.fromtimestamp(float(ms_since_epoch) / 1000.0) | |
print(ms_since_epoch) | |
print(dt) |
#include <iostream> | |
#include <functional> | |
typedef int (*int_fn_t)(int); | |
extern "C" void c_call(int_fn_t fn); | |
void c_call(int_fn_t fn) { | |
std::cout << fn(0) << std::endl; | |
} | |
typedef void (*void_fn_t)(void); |
#include <iostream> | |
#include <stdlib.h> | |
#include <sanitizer/lsan_interface.h> | |
/** | |
* clang++ -g -fsanitize=address asantest.cpp | |
* ASAN_OPTIONS=detect_leaks=1 ./a.out | |
* | |
* ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer |
#include <iostream> | |
#include <vector> | |
class Base { | |
public: | |
Base() {} | |
virtual int func() = 0; | |
}; | |
class Sub1 : public Base { |