Skip to content

Instantly share code, notes, and snippets.

@uralbash
uralbash / multiple_ssh_setting.md
Created Oct 16, 2017 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

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"
View tree_of_taxonomy.py
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 / flask-mptt.py
Last active Oct 19, 2016
flask, mptt and sqlalchemy
View flask-mptt.py
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)
@uralbash
uralbash / pkg-config.sh
Created Mar 11, 2016
Nix pkg manager Python.h
View pkg-config.sh
$ 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 / SQLAlchemyMyAdmin.py
Last active Mar 23, 2016
Funny application demonstrates the capabilities of SQLAlchemy and Pyramid.
View SQLAlchemyMyAdmin.py
#! /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.