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
var debug = {}; | |
OO.ready(function() { | |
OO.Player.create( | |
'ooyalaplayer', | |
'{{ request.GET.ocid }}', | |
{ | |
"enableChannels": true, | |
"wmode" : "transparent", | |
onCreate: function(player) { |
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
from fabric.api import * | |
from fabric.colors import cyan, green | |
print(cyan('')) | |
print(cyan(' _,-""`""-~`)')) | |
print(cyan('(`~ \\')) | |
print(cyan(' | a a \\')) | |
print(cyan(' ; o ; ___ _,,,,_ _.-~\'.')) | |
print(cyan(' \ `^` /`_.-"~ `~-;` \\')) | |
print(cyan(' \_ _ .\' `, |')) |
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
DEFAULT="[37;40m" | |
PINK="[35;40m" | |
GREEN="[32;40m" | |
ORANGE="[33;40m" | |
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/\1/'" | |
export PS1='\n\e${PINK}\u \e${DEFAULT}at \e${ORANGE}\h\ | |
\e${DEFAULT}in \e${GREEN}\w \e${DEFAULT}on \e${PINK}$(__git_ps1) $(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -eq "0" ]; then echo ""; else echo "!"; fi) \e${DEFAULT} \n~ 🍔 ' |
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
0 5,13 * * * pg_dump dbname_dev --no-owner > /var/lib/postgresql/backups/dev-`date +\%Y-\%m-\%d_\%T`.sql | |
0 5,13 * * * pg_dump dbname_uat --no-owner > /var/lib/postgresql/backups/uat-`date +\%Y-\%m-\%d_\%T`.sql |
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 boto.ec2 | |
aws_access_key_id='' | |
aws_secret_access_key='' | |
conn = boto.ec2.connect_to_region("eu-west-1", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) | |
reservations = conn.get_all_reservations() | |
boxes = [ | |
{ 'name': 'skylark-web-dev-01', 'current_ip': '' }, | |
{ 'name': 'skylark-web-uat-01', 'current_ip': '' }, |
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
from collections import defaultdict, OrderedDict | |
from wagtail.wagtailcore.models import Page | |
from lma.apps.manager.models import ManagerPage | |
from lma.apps.article.models import ArticlePage | |
from lma.apps.video.models import VideoPage | |
search_types = OrderedDict([ | |
('manager', ('Manager Profiles', ManagerPage)), | |
('statement', ('Statements', ArticlePage)), |
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 boto.ec2 | |
aws_access_key_id='' | |
aws_secret_access_key='' | |
conn = boto.ec2.connect_to_region("eu-west-1", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) | |
reservations = conn.get_all_reservations() | |
def get_login(instance): | |
if 'name' in instance.tags: |
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
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
AWS_S3_SECURE_URLS = False | |
AWS_QUERYSTRING_AUTH = False | |
AWS_S3_ACCESS_KEY_ID = "" | |
AWS_S3_SECRET_ACCESS_KEY = "" | |
AWS_STORAGE_BUCKET_NAME = 'bucket_name' | |
AWS_HEADERS = { | |
'Expires': 'Thu, 15 Apr 2010 20:00:00 GMT', | |
'Cache-Control': 'max-age=86400', | |
'Content-Type': 'text/xml' |
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
from django.db import models | |
from django.contrib import admin | |
class Tweet(models.Model): | |
text = models.CharField(max_length=140) | |
created_at = models.DateTimeField() | |
tweet_id = models.BigIntegerField() | |
visible = models.BooleanField(default=True) | |
ITEMS_PER_PAGE = 10 |
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 boto.s3 | |
aws_access_key_id='' | |
aws_secret_access_key='' | |
conn = boto.s3.connect_to_region("ap-southeast-1", aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) | |
conn.get_all_buckets() |
OlderNewer