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
/* | |
* Grunt Task File | |
* --------------- | |
* | |
* Task: JST-HB | |
* Description: Compile handlebars templates to JST file. | |
* Dependencies: [email protected] | |
* | |
*/ |
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
// {{compare unicorns ponies operator="<"}} | |
// I knew it, unicorns are just low-quality ponies! | |
// {{/compare}} | |
// | |
// (defaults to == if operator omitted) | |
// | |
// {{equal unicorns ponies }} | |
// That's amazing, unicorns are actually undercover ponies | |
// {{/equal}} | |
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/) |
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
ctive moped count: 110721 | |
Traceback (most recent call last): | |
File "./manage.py", line 14, in <module> | |
execute_manager(settings) | |
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/__init__.py", line 459, in execute_manager | |
utility.execute() | |
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/base.py", line 196, 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
this.client = new Dropbox.Client({ | |
key: "<your secret key>", | |
sandbox: true, | |
token: dropboxProfile.oauth_token_key, | |
tokenSecret: dropboxProfile.oauth_token_secret | |
}); |
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
this.client = new Dropbox.Client({ | |
key: "<your secret key>", | |
sandbox: true, | |
token: dropboxProfile.oauth_token_key, | |
tokenSecret: dropboxProfile.oauth_token_secret | |
}); |
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
upload: function(file) { | |
var def = new $.Deferred(); | |
var that = this; | |
var xhr = this.client.writeFile(file.name, file, {noOverwrite: true}, function(error, metadata) { | |
if (error) { | |
def.reject(error); | |
return; | |
} | |
def.resolve(metadata); |
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
handleFile: function(file) { | |
if (file.size / 1000000 > 150) { | |
var err = "We only support files up to 150 MB"; | |
alert(err); | |
... | |
} | |
var that = this; | |
$.when(this.upload(file)).pipe(this.getSharedUrl). |
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
orgFetch = Backbone.Collection::fetch | |
Backbone.Collection::fetch = (options={}) -> | |
success = options.success | |
options.success = (collection, resp, options) -> | |
collection.trigger 'before:add:all', collection, resp, options | |
collection.each (model) -> | |
model.trigger('add', model, collection, options) | |
collection.trigger 'add:all', collection, resp, options | |
success(collection, resp, options) if success |
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 log = function(text) { | |
var el = document.createElement('p'); | |
el.innerHTML = text; | |
var body = document.getElementsByTagName('body')[0]; | |
body.appendChild(el); | |
} |
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
$icons: ( | |
follow: 'a', | |
followed: 'b', | |
unfollow: 'c', | |
checkmark: 'e' | |
); | |
$Placeholder-Selectors: (); | |
@mixin icon($name, $color, $extend: true) { | |
@include icon-static($extend); |
OlderNewer