Skip to content

Instantly share code, notes, and snippets.

View leopard627's full-sized avatar
🎯
Focusing

Leopard627 leopard627

🎯
Focusing
View GitHub Profile
@leopard627
leopard627 / test_models.py
Last active May 18, 2017 06:54
image_mocking.py
def using_mock():
import mock
from django.core.files import File
file_mock = mock.MagicMock(spec=File, name='FileMock')
def using_tempfile():
import tempfile
import stripe
stripe.api_key = 'tGN0bIwXnHdwOa85VABjPdSn8nWY7G7I'
print "Attempting charge..."
resp = stripe.Charge.create(
amount=200,
currency='usd',
card={
@leopard627
leopard627 / tmux-cheatsheet.markdown
Created March 20, 2017 14:05 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname