Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimir Chub vartagg

  • Krasnoyarsk
View GitHub Profile
@omarryhan
omarryhan / Sanic-Gino-Alembic migrations Setup
Last active May 30, 2020
Sanic/Gino/Alembic migrations
View Sanic-Gino-Alembic migrations Setup
# Do the first 6 steps only once.
1. pip install --user alembic
2. bash: ``cd {{my_project}} && alembic init alembic``
3. bash: ``text_editor {{my_project}}/alembic.ini``
4. Change: "sqlalchemy.url = postgres://{{username}}:{{password}}@{{address}}/{{db_name}}"
5. bash: ``text_editor {{my_project}}/alembic/env.py``
6. Now, import your metadata/db object from your app.:
# {{my_project}}/{{my_project_dir}}/app.py
@akx
akx / client.py
Created May 15, 2013
Simple uWSGI + XML-RPC
View client.py
import xmlrpclib
s = xmlrpclib.ServerProxy('http://localhost:3040')
print s.pow(2,3)
print s.sum([2,3])
print s.system.listMethods()
@rtomaszewski
rtomaszewski / example_paramiko_with_tty.py
Created Aug 19, 2012
example paramiko script with interactive terminal
View example_paramiko_with_tty.py
import paramiko
import time
import re
bastion_ip='ip'
bastion_pass='pass'
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy() )
ssh.connect(bastion_ip, username='root', password=bastion_pass)
@zanshin
zanshin / .zshrc
Created Aug 12, 2011
My .zshrc file
View .zshrc
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"
You can’t perform that action at this time.