Skip to content

Instantly share code, notes, and snippets.

View vartagg's full-sized avatar

Vladimir Chub vartagg

View GitHub Profile
@zanshin
zanshin / .zshrc
Created August 12, 2011 19:09
My .zshrc file
# 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"
@rtomaszewski
rtomaszewski / example_paramiko_with_tty.py
Created August 19, 2012 19:49
example paramiko script with interactive terminal
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)
@omarryhan
omarryhan / Sanic-Gino-Alembic migrations Setup
Last active May 30, 2020 15:49
Sanic/Gino/Alembic migrations
# 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 16:08
Simple uWSGI + XML-RPC
import xmlrpclib
s = xmlrpclib.ServerProxy('http://localhost:3040')
print s.pow(2,3)
print s.sum([2,3])
print s.system.listMethods()