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
# | |
# | |
def create_table_for_unrelated_model(model, database_name): | |
from django.db import connections, transaction | |
from django.core.management.sql import custom_sql_for_model | |
from django.core.management.color import no_style | |
connection = connections[database_name] | |
cursor = connection.cursor() | |
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 jinja2 import Template as Jinja2Template | |
from django.test import signals | |
#note - this code can be run only once | |
ORIGINAL_JINJA2_RENDERER = Jinja2Template.render | |
def instrumented_render(template_object, *args, **kwargs): | |
context = dict(*args, **kwargs) | |
signals.template_rendered.send( | |
sender=template_object, | |
template=template_object, |
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
#!/bin/bash -e | |
if [ -f /etc/cron.d/initialrunner ]; then | |
rm /etc/cron.d/initialrunner | |
fi | |
# Update the server | |
apt-get update -y | |
aptitude -yf full-upgrade | |
aptitude install -y git |
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 os, sys | |
import datetime | |
import base64 | |
import cloudservers | |
import cloudlb | |
import urllib2 | |
#import paramiko | |
from time import sleep |
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
/* User File Prefs */ | |
{ | |
"auto_match_enabled": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme", | |
"draw_minimap_border": true, | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Monaco", | |
"font_size": 12, | |
"scroll_past_end": true, | |
"tab_size": 4, |
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
innodb_flush_log_at_trx_commit = 0 | |
innodb_support_xa = 0 |
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
★★★★★ We heard your feedback - Domino! Free now has less ads! Next update will have even fewer. Upgrade to the paid version to get rid of ads forever! ★★★★★ | |
The reviews are in! | |
* "Crazy addictive!" - adjote | |
* "Best Domino game out there." - redvision4 | |
* "Only issue is that it is completely addictive!" - Name_me | |
* "Players who enjoy a game of dominoes should give this one a try" - 148apps.com | |
* "Simply awesome." - Angel Pizarro |
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
#!/bin/sh | |
START=`date +%s%N` | |
# Do stuff here | |
END=`date +%s%N` | |
ELAPSED=`echo "scale=8; ($END - $START) / 1000000000" | bc` |