Skip to content

Instantly share code, notes, and snippets.

@uralbash
uralbash / SQLAlchemyMyAdmin.py
Last active March 23, 2016 05:44
Funny application demonstrates the capabilities of SQLAlchemy and Pyramid.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 uralbash <root@uralbash.ru>
#
# Distributed under terms of the MIT license.
"""
Funny application demonstrates the capabilities of SQLAlchemy and Pyramid.
@uralbash
uralbash / pkg-config.sh
Created March 11, 2016 19:26
Nix pkg manager Python.h
$ PKG_CONFIG_PATH=/nix/store/xm2yjz479faibz2pmhl46asn46kwx9fb-python3-3.5.1/lib/pkgconfig/ pkg-config --libs python3
-L/nix/store/xm2yjz479faibz2pmhl46asn46kwx9fb-python3-3.5.1/lib -lpython3.5m
@uralbash
uralbash / flask-mptt.py
Last active August 30, 2023 11:11
flask, mptt and sqlalchemy
from pprint import pprint
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy_mptt.mixins import BaseNestedSets
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(app)
from collections import defaultdict
def tree(): return defaultdict(tree)
groups = tree()
with open('taxonomy.en-US.txt') as file:
for row in file.readlines():
items = row.split(' > ')
@uralbash
uralbash / multiple_ssh_setting.md
Created October 16, 2017 08:21 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"