This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.
This file contains hidden or 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 | |
| from checkpid import pidcheck | |
| from time import sleep | |
| import logging | |
| log = logging.getLogger("checkpid") | |
| log.setLevel(logging.INFO) | |
| log.setLevel(logging.DEBUG) | |
| ch = logging.StreamHandler() |
This file contains hidden or 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 bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Copyright 2013 Brent O'Connor | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
| } |
This file contains hidden or 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 time | |
| from contextlib import contextmanager | |
| from datetime import timedelta | |
| from rich.align import Align | |
| from rich.columns import Columns | |
| from rich.console import Console | |
| from rich.padding import Padding | |
| from rich.style import Style | |
| from rich.text import Text |
This file contains hidden or 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
| digitalocean_domain.example example.com | |
| digitalocean_record.example example.com,<DO ID> | |
| digitalocean_record.fd-gmail-txt example.com,<DO ID> | |
| digitalocean_record.fd-mx["alt1.aspmx.l.google.com."] example.com,<DO ID> | |
| digitalocean_record.fd-mx["alt2.aspmx.l.google.com."] example.com,<DO ID> | |
| digitalocean_record.fd-mx["aspmx.l.google.com."] example.com,<DO ID> | |
| digitalocean_record.fd-mx["aspmx2.googlemail.com."] example.com,<DO ID> | |
| digitalocean_record.fd-mx["aspmx3.googlemail.com."] example.com,<DO ID> | |
| digitalocean_record.fd-ns["1"] example.com,<DO ID> | |
| digitalocean_record.fd-ns["2"] example.com,<DO ID> |
This file contains hidden or 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
| from django.core.management.base import BaseCommand | |
| from mymodule import main | |
| import logging | |
| class Command(BaseCommand): | |
| help = 'Do foo' | |
| def handle(self, *args, **options): |
This file contains hidden or 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
| CELERY=`ps -A -o pid,rss,command | grep celeryd | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
| GUNICORN=`ps -A -o pid,rss,command | grep gunicorn | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
| REDIS=`ps -A -o pid,rss,command | grep redis | grep -v grep | awk '{total+=$2}END{printf("%d", total)}'` | |
| NGINX=`ps -A -o pid,rss,command | grep nginx | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
| OTHER=`ps -A -o pid,rss,command | grep -v nginx | grep -v celeryd | grep -v gunicorn | grep -v redis | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
| websites=`ps -A -o user,pid,rss,command | grep gunicorn | egrep -o "[a-z_]+\.py$" | sort | uniq | perl -wpe 's|\.py$||;' | xargs` | |
| printf "%-10s %3s MB\n" "Celery:" $CELERY | |
| printf "%-10s %3s MB\n" "Gunicorn:" $GUNICORN | |
| printf "%-10s %3s MB\n" "Nginx:" $NGINX | |
| printf "%-10s %3s KB\n" "Redis:" $REDIS |
This file contains hidden or 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
| # source: http://w1.weather.gov/xml/current_obs/weather.php | |
| # icon_url: http://w1.weather.gov/images/fcicons/<weather_code>.jpg | |
| noaa_weather_codes = { | |
| 'bkn': 'Mostly Cloudy | Mostly Cloudy with Haze | Mostly Cloudy and Breezy', | |
| 'nbkn': 'Mostly Cloudy | Mostly Cloudy with Haze | Mostly Cloudy and Breezy', | |
| 'skc': 'Fair | Clear | Fair with Haze | Clear with Haze | Fair and Breezy | Clear and Breezy', | |
| 'nskc': 'Fair | Clear | Fair with Haze | Clear with Haze | Fair and Breezy | Clear and Breezy', | |
| 'few': 'A Few Clouds | A Few Clouds with Haze | A Few Clouds and Breezy', | |
| 'nfew': 'A Few Clouds | A Few Clouds with Haze | A Few Clouds and Breezy', | |
| 'sct': 'Partly Cloudy | Partly Cloudy with Haze | Partly Cloudy and Breezy', |
This file contains hidden or 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
| # Django Aliases | |
| alias d=django-admin.py | |
| alias dt='django-admin.py test' | |
| alias dsa='django-admin.py startapp --template=https://github.com/epicserve/django-app-template/archive/master.zip' | |
| alias dsp='django-admin.py startproject --template=https://github.com/epicserve/django-base-site/archive/master.zip' | |
| alias dsma='django-admin.py schemamigration --auto' | |
| alias dsmi='django-admin.py schemamigration --initial' | |
| alias dm='django-admin.py migrate' | |
| # shortcut for starting django's runserver on a different port |
NewerOlder