Skip to content

Instantly share code, notes, and snippets.

Max Lobur max-lobur

Block or report user

Report or block max-lobur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@max-lobur
max-lobur / keybase.md
Created May 16, 2019
keybase.io proof of my github identity
View keybase.md

Keybase proof

I hereby claim:

  • I am max-lobur on github.
  • I am lobur (https://keybase.io/lobur) on keybase.
  • I have a public key ASBBAvBaCoxEv1vX-l3LRjcj9QLAVd1oD_0O4LP024iabwo

To claim this, I am signing this object:

View pip-install-skip-errors.sh
#!/bin/sh
if [ -z "$1" ]; then echo NEED PATH TO requirements.txt; exit; fi
while read dependency; do
dependency_stripped="$(echo "${dependency}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
# Skip comments
if [[ $dependency_stripped == \#* ]]; then
continue
# Skip blank lines
View get_ubuntu_root.sh
IMAGE=trusty-server-cloudimg-amd64
wget https://cloud-images.ubuntu.com/trusty/current/$IMAGE.tar.gz
tar -xzvf $IMAGE.tar.gz
glance image-create --name ubuntu-root --is-public True --disk-format raw --container-format bare --progress < $(IMAGE).img
@max-lobur
max-lobur / get_cirros.sh
Last active Sep 9, 2015
devstack tweaks
View get_cirros.sh
. ~/devstack/openrc admin demo
for id in $(glance image-list | grep cirros | cut -d'|' -f2); do glance image-delete id; done
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img
glance image-create --name cirros --disk-format qcow2 --container-format bare --file cirros-0.3.4-i386-disk.img --is-public=True --progress
View evenlet brokes futures.ProcessPoolExecutor
import eventlet
import futures
import random
import sys
#eventlet.monkey_patch(os=False)
def test():
if random.choice((True, False)):
raise Exception()
View Omits duplicate
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, ForeignKey, String, create_engine
from sqlalchemy.orm import relationship, sessionmaker
engine = create_engine("sqlite:///:memory:", echo="debug")
Session = sessionmaker(bind=engine)
BASE = declarative_base()
session = Session()
You can’t perform that action at this time.