Skip to content

Instantly share code, notes, and snippets.

View ericwwsun's full-sized avatar

Eric Sun ericwwsun

  • IBM iX
  • New York City
View GitHub Profile
ERROR 2014-01-13 20:47:23,637 base 5337 140188056676096 Internal Server Error: /account/profileCancelPlanRenew/
Traceback (most recent call last):
File "/persistent/dramafever/.virtualenvs/df/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/persistent/dramafever/.virtualenvs/df/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/persistent/dramafever/trunk/dramafever/main/views.py", line 1101, in plan_cancel_renew_view
next_billing_period_amount, discount_amount = userSubs.get_deter_cancel_discount_info()
File "/persistent/dramafever/trunk/dramafever/premium/models.py", line 1472, in get_deter_cancel_discount_info
sub = braintree.Subscription.find(self.subscription_id)
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@ericwwsun
ericwwsun / gist:9694363
Created March 21, 2014 19:33
[Javascript] [Angular] Capturing document level keypress events in AngularJS
<html lang="en" ng-controller="AppController" ng-keyup="keyup($event)">
var AppController = function($scope) {
$scope.keyup = function(keyEvent) {
console.log('keyup', keyEvent);
};
};
@ericwwsun
ericwwsun / gist:ea3e73be4a77b997563f
Created June 16, 2014 16:29
[CSS] keeping ratio box
.square {
//width within the parent
width: 100%;
&:before {
content: "";
float: left;
//essentially the aspect ratio. 100% means the
//div will remain 100% as tall as it is wide, or
//square in other words.
padding-bottom: 100%;