Skip to content

Instantly share code, notes, and snippets.

View ryanhiebert's full-sized avatar

Ryan Hiebert ryanhiebert

View GitHub Profile
@ryanhiebert
ryanhiebert / block.py
Last active March 30, 2025 18:21
Blocking protocol for multiple locks
from os import sched_yield
from functools import wraps
from abc import ABC, abstractmethod
def block(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
return Block(fn(*args, **kwargs))
return wrapper
@ryanhiebert
ryanhiebert / socks_sftp.py
Created December 20, 2016 18:54
SFTP via SOCKS Proxy using Paramiko
import paramiko, socks
# PySocks recommends using no arguments,
# because it only supports the defaults anyway.
sock = socks.socksocket()
host, port = '127.0.0.1', 1234
# Set up your proxy information for this socket
sock.set_proxy(

Install cx_Oracle for Python on OS X

Download the following files from Oracle. You'll to login (it's free to register) to download the files.

Create a directory /usr/lib/share/oracle

export ORACLE_HOME=/usr/lib/share/oracle
export VERSION=11.2.0.3.0
export ARCH=x86_64

Keybase proof

I hereby claim:

  • I am ryanhiebert on github.
  • I am ryanhiebert (https://keybase.io/ryanhiebert) on keybase.
  • I have a public key whose fingerprint is 116C 4279 A757 FF3E F73F C631 C4BA 7758 F7B7 4717

To claim this, I am signing this object: