(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
#!/usr/bin/python2.7 | |
# -*- coding: utf-8 -*- | |
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab | |
""" | |
Watch for new downloads in ~/Downloads (or another directory) and take actions. | |
The actions are determined by the file extension (determining the mime type). | |
""" | |
from __future__ import absolute_import | |
from __future__ import print_function |
def copy_row(model, row, ignored_columns=[]): | |
copy = model() | |
for col in row.__table__.columns: | |
if col.name not in ignored_columns: | |
try: | |
copy.__setattr__(col.name, getattr(row, col.name)) | |
except Exception as e: | |
print e | |
continue |
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL | |
# FOR DEMONSTRATION PURPOSES ONLY | |
# YOUR MILEAGE MAY VARY | |
# Requirements are Flask, Flask-WTF, Flask-SQLAlchemy | |
import os | |
from flask import (Flask, | |
Blueprint, | |
redirect, |
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html | |
# First of all you need to have a clean clone of the source repository so we didn't screw the things up. | |
git clone git://server.com/my-repo1.git | |
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command | |
git filter-branch --subdirectory-filter your_dir -- -- all | |
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command. |