In the Vagrantfile, do :
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network :public_network
| #http://googledevjp.blogspot.com/2011/04/google-code-jam-2011.html | |
| def solve(rest, boards, counts): | |
| if boards == []: | |
| return rest == 0 | |
| board = boards[-1] | |
| count = rest / board | |
| rest = rest % board | |
| while count >= 0: | |
| if solve(rest, boards[0:-1], counts): |
| @Override | |
| public void run(TestDropwizardConfiguration configuration, Environment environment) | |
| throws Exception | |
| { | |
| env.lifecycle().addLifeCycleListener(new AbstractLifeCycleListener() | |
| { | |
| @Override | |
| public void lifeCycleStarting(LifeCycle event) | |
| { | |
| if (!(event instanceof Server)) |
| import sys | |
| import xml.etree.cElementTree as et | |
| from io import BytesIO | |
| from django.core.exceptions import ValidationError | |
| from django.core.validators import ( | |
| FileExtensionValidator, | |
| get_available_image_extensions, | |
| ) | |
| from django.forms import ImageField as DjangoImageField |
| #!/bin/bash | |
| # for use with cron, eg: | |
| # 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: $0 <db_name> [pg_dump args]" | |
| exit 1 | |
| fi |
| var allowPaste = function(e){ | |
| e.stopImmediatePropagation(); | |
| return true; | |
| }; | |
| document.addEventListener('paste', allowPaste, true); |