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 simplifyPath = function( points, tolerance ) { | |
// helper classes | |
var Vector = function( x, y ) { | |
this.x = x; | |
this.y = y; | |
}; | |
var Line = function( p1, p2 ) { | |
this.p1 = p1; |
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
(ffenv)Adam-Millers-iMac:webifyme adam$ python ff4/manage.py syncdb | |
Traceback (most recent call last): | |
File "ff4/manage.py", line 46, in <module> | |
execute_manager(settings) | |
File "/Users/adam/Sites/barbarian/webifyme/ffenv/src/django/django/core/management/__init__.py", line 438, in execute_manager | |
utility.execute() | |
File "/Users/adam/Sites/barbarian/webifyme/ffenv/src/django/django/core/management/__init__.py", line 379, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Users/adam/Sites/barbarian/webifyme/ffenv/src/django/django/core/management/base.py", line 191, in run_from_argv | |
self.execute(*args, **options.__dict__) |
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>JS Fallback Example</title> | |
</head> | |
<body> | |
<noscript> | |
<div id="fallback" class="overlay-wrapper"> | |
<div id="fallback-content"> | |
<p>Your browser doesn't support the features used on this site. Please download a more modern browser.</p> |
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
define( 'healthy', | |
['underscore', 'healthy/intro', 'healthy/quiz', 'healthy/results'], | |
function( _, intro, quiz, results ) { | |
var Healthy = { | |
'publicFn': { | |
'init': function( bodyClass ) { | |
Healthy.privateFn.setup( bodyClass ); | |
Healthy.privateFn.onFacebookInit( function() { | |
$( window ).trigger( 'FBInit' ); |
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
template: { | |
b2b: { | |
src: SRC_TMP + 'b2b.dust', | |
dest: BUILD_TMP + 'b2b.html', | |
variables: _.extend( grunt.file.readJSON(SRC_TMP + '../data/common.json'), {preserveWhiteSpace: true}) | |
} | |
} |
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
less: { | |
src: [ | |
SRC_CSS + 'vendor/elements.less', | |
SRC_CSS + 'ge.vars.less', // NEEDS REMOVED | |
SRC_CSS + 'ge.mixins.less', // NEEDS REMOVED | |
SRC_CSS + 'ge.b2b.less', | |
SRC_CSS + 'ge.footer.less', | |
SRC_CSS + 'ge.navigation.less' | |
], | |
dest: BUILD_CSS + 'ge.base.less' |
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 a = 1, | |
b = 2, | |
c = function() { | |
var d = 3, | |
e = function() { | |
var f = 4; | |
}; | |
console.log('a = ', a); | |
console.log('b = ', a); | |
console.log('d = ', a); |
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
// Build and update staging | |
grunt.registerTask("sprite", "Builds sprite sheets from the src imges", function() { | |
var task = this, | |
// tell grunt this task is async | |
done = this.async(), | |
commands = [ | |
"montage img/_icons_blue/*.png -tile 1x -geometry '100x80>+0+0' -gravity NorthWest -background transparent img/icon_blue_sprite_2x.png", | |
"montage img/_icons_white/*.png -tile 1x -geometry '100x80>+0+0' -gravity NorthWest -background transparent img/icon_white_sprite_2x.png", | |
"convert img/icon_white_sprite_2x.png -negate img/icon_black_sprite_2x.png", | |
"convert img/icon_white_sprite_2x.png -resize 50% img/icon_white_sprite_1x.png", |
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
# We override some fo the Flash code here to ensure our flash messages from this app are written to a different | |
# session key than the default. This prevents conflicts with our older rails applications | |
require "rails" | |
ActionDispatch::Request.class_eval do | |
def flash | |
@env["#{Flash::KEY}_four"] ||= Flash::FlashHash.from_session_value(session['flash_4']) | |
end | |
end |
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
define ["underscore", "backbone" ], (_, Backbone) -> | |
FilteredAttributes = | |
# Instruct toJSON to use a root node | |
rootNode: null | |
# Add attribute names to filteredAttributes to exclude them from JSON | |
filteredAttributes: [] | |
# Process our JSON, excluding filteredAttributes, and using | |
# rootNode if present | |
toJSON: -> |
OlderNewer