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
#!/usr/bin/env python | |
# Usage: | |
# This script will generate two files(vpnup and vpndown) after executing. | |
# Do chmod a+x on the two newly created files, and then move them to the | |
# openvpn config folder. then add the following two lines to the vpn config file: | |
# up vpnup | |
# down vpndown | |
# you might also need 'redirect-gateway' in the config file, if you don't use vpn | |
# as the default gateway. |
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
namespace :deploy do | |
desc 'Bundle and minify the JS and CSS files' | |
task :precache_assets, :roles => :app do | |
root_path = File.expand_path(File.dirname(__FILE__) + '/..') | |
jammit_path = Dir["#{root_path}/vendor/gems/jammit-*/bin/jammit"].first | |
yui_lib_path = Dir["#{root_path}/vendor/gems/yui-compressor-*/lib"].first | |
assets_path = "#{root_path}/public/assets" | |
# Precaching assets | |
run_locally "ruby -I#{yui_lib_path} #{jammit_path}" |
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 logging | |
from google.appengine.api import memcache | |
from google.appengine.api import apiproxy_stub_map | |
from google.appengine.datastore import datastore_pb | |
"""Provides a shim that caches datastore Get calls. | |
Example code: | |
import datastore_get_cache |