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
/** | |
* MEDIA QUERY VARIABLES | |
* ------------------------------------------------------------------------- */ | |
$tablet_landscape_width: "1024px"; | |
$tablet_portrait_width: "768px"; | |
$phone_landscape_width: "667px"; | |
$phone_portrait_width: "375px"; | |
/** | |
Mixin for Media Queries |
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
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor | |
-- (Or export to .app to run from spotlight.) | |
-- 2. Set domainName, vpnGroup and securePassword to their correct values for your VPN server and password | |
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility | |
-- 4. Enable Applescript Editor and System UI Server (or for this .app if so exported) | |
-- 5. Trigger script from the menu (or run from spotlight) | |
-- 6. Enjoy being connected | |
-- 7. Run script again to close connection | |
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 django.views.generic.base import ContextMixin | |
from django.contrib.admin.utils import NestedObjects | |
class RelatedObjectsMixin(ContextMixin): | |
"""Adds the related_objects list to a views context """ | |
def get_context_data(self, **kwargs): | |
context = super(RelatedObjectsMixin, self).get_context_data(**kwargs) | |
collector = NestedObjects(using='default') |
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
{% if is_paginated %} | |
{% load i18n %} | |
<ul class="pagination"> | |
<li{% if not page_obj.has_previous %} class="disabled"{% endif %}><a href="{% if not page_obj.has_previous %}#{% else %}?page={{ page_obj.previous_page_number }}{{ getvars }}{% endif %}">«</a></li> | |
{% if show_first %} | |
<li><a href="?page=1{{ getvars }}">1</a></li> | |
<li><span>...</span></li> | |
{% endif %} |
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
var date1 = new Date(); | |
var date2 = new Date(2099, 10, 11); | |
console.log(date1); | |
console.log(date2); | |
console.log(date1 >= date2); | |
console.log(date1 <= date2); | |
console.log(date1 == date2); | |
console.log(date1 === date2); |
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
var date1 = new Date(2013, 10, 12); | |
var date2 = new Date(2013, 10, 12); | |
/* | |
When running the javascript in this file you get the following output ... | |
$ node js_date_test.js | |
Tue Nov 12 2013 00:00:00 GMT-0800 (PST) | |
Tue Nov 12 2013 00:00:00 GMT-0800 (PST) | |
false |
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
console.log(new Date("Nov 11, 2013")); | |
console.log(new Date(2013, 11, 11)); | |
// $ node js-date-test.js | |
// Mon Nov 11 2013 00:00:00 GMT-0800 (PST) | |
// Wed Dec 11 2013 00:00:00 GMT-0800 (PST) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DB Stacktrace</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap --> | |
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
<link href="http://getbootstrap.com/docs-assets/css/pygments-manni.css" rel="stylesheet" media="screen"> | |
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> |