start new:
tmux
start new with session name:
tmux new -s myname
countries = [ | |
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
""" | |
Gets the name of the active Git branch as a string. | |
Depends on GitPython | |
pip install GitPython | |
""" | |
from git import Repo | |
repo = Repo('/path/to/your/repo') | |
branch = repo.active_branch |
------------------------------- ------------------ Django -------------------- | Browser: GET /udo/contact/2 | === wsgi/fcgi ===> | 1. Asks OS for DJANGO_SETTINGS_MODULE | ------------------------------- | 2. Build Request (from wsgi/fcgi callback) | | 3. Get settings.ROOT_URLCONF module | | 4. Resolve URL/view from request.path | # url(r'^udo/contact/(?P<id>\w+)', view, name='url-identifier') | 5. Apply request middlewares | # settings.MIDDLEWARE_CLASSES
#!/bin/bash | |
# git-standup: find out what you did yesterday (or last friday). | |
# | |
# Setup: | |
# 1. Change AUTHOR if your git user doesn't match your unix account. | |
# 2. Save somewhere on your path, make executable. | |
# 3. git config --global alias.standup '!git-standup' | |
# 4. Profit. | |
# | |
# Original idea via @paulgreg (https://twitter.com/paulgreg/status/248686055727972352) |
import sys | |
from subprocess import PIPE, Popen | |
from threading import Thread | |
try: | |
from Queue import Queue, Empty | |
except ImportError: | |
from queue import Queue, Empty # python 3.x | |
ON_POSIX = 'posix' in sys.builtin_module_names |
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "solid", | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"create_window_at_startup": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store" |
#!/usr/bin/env python3 | |
""" | |
mountree | |
======== | |
This prints all your filesystem mounts in a tree so you can see how they | |
are laid out. | |
It only works on Linux because it uses ``/proc``. | |
:copyright: © 2014 Matthew Frazier |