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
""" | |
module mydjangolib.bigint_patch | |
A fix for the rather well-known ticket #399 in the django project. | |
Create and link to auto-incrementing primary keys of type bigint without | |
having to reload the model instance after saving it to get the ID set in | |
the instance. | |
Logs: |
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 __future__ import absolute_import | |
import settings | |
from storages.backends.s3boto import S3BotoStorage | |
from boto.s3.connection import SubdomainCallingFormat | |
def getattr_backup(obj, key, backupkey, default): | |
result = getattr(obj, key, None) | |
if result is None: |
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
# /config.ru | |
# This file is used by Rack-based servers to start the application. | |
# File generated by "rails create MyApp" | |
# For Rails | |
require ::File.expand_path('../config/environment', __FILE__) | |
# For Sinatra | |
require './slim/slim.rb' | |
# - Make sinatra play nice |
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
# /config.ru | |
# This file is used by Rack-based servers to start the application. | |
# For Rails | |
require ::File.expand_path('../config/environment', __FILE__) | |
# For Sinatra | |
require './slim/slim.rb' | |
# - Make sinatra play nice | |
use Rack::MethodOverride |
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
# /slim/slim.rb | |
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
require 'rubygems' | |
require 'sinatra' | |
class AppMain < Sinatra::Application | |
set :root, APP_ROOT | |
get '/' do |
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
/** | |
* Extracted from: https://github.com/beedesk/jQTouch/commit/b5d2fc63fe15acba15c4e8eaafc0e128997f8484 | |
*/ | |
/* ============= from themes/apple/theme.css ============= */ | |
#jqt > * { | |
-webkit-transform: translate3d(0,0,0); | |
-webkit-backface-visibility: hidden; | |
background: rgb(197,204,211) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCC); | |
-webkit-user-select: ignore; |
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
/** | |
* Here is the simplified version. Courtesy of Mike Koss. | |
* | |
* See, http://labnote.beedesk.com/the-pitfalls-of-html5-applicationcache | |
*/ | |
function handleAppCache() { | |
if (applicationCache == undefined) { | |
return; | |
} | |
NewerOlder