Skip to content

Instantly share code, notes, and snippets.

View alexanderad's full-sized avatar

Alexander Shchapov alexanderad

View GitHub Profile
@alexanderad
alexanderad / gist:65aab071d3692205ba18
Created April 26, 2015 06:25
iterm2 additional key codes
FOR ACTION SEND
⌥Shift← "HEX CODE" 0x01 < line start
⌥Shift→ "HEX CODE" 0x05 > line end
⌥← "SEND ESC SEQ" b < one word back
⌥→ "SEND ESC SEQ" f > one word forward
⌥w "SEND ESC SEQ" 0x17 delete one word
⌥ShiftW "SEND ESC SEQ" 0x15 delete line
from peewee import *
database = SqliteDatabase(':memory:')
class Model(Model):
class Meta:
database = database
class User(Model):
@alexanderad
alexanderad / pre-commit
Last active December 20, 2015 16:39 — forked from lentil/gist:810399
GIT pre-commit hook for python project, which uses simplified pep8 checks and pyflakes checks. 0) pip install pyflakes && pip install pep8 1) download https://gist.github.com/alexanderad/6163219 2) mv <downloaded file name> .git/hooks/pre-commit 4) chmod +x .git/hooks/pre-commit 5) ... 6) PROFIT!
#!/usr/bin/python
import os
import re
import shutil
import subprocess
import sys
import tempfile
def system(*args, **kwargs):
@alexanderad
alexanderad / 0_reuse_code.js
Created October 16, 2016 08:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console