This file contains hidden or 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
| // User submission model | |
| var UserSubmissionModel = Backbone.Model.extend({ | |
| // Backbone looks for 'id' by default | |
| // However, MongoDB uses '_id' so we need to override it | |
| idAttribute: '_id', | |
| // Add a Basic Auth header to authenticate with Kinvey | |
| sync: function(method, model, options) { | |
| var self = this; | |
| options.beforeSend = function(jqXHR) { |
This file contains hidden or 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
| javascript:(function(n,j,l,k,m,p,i,o)%7Bif(!(m=n.jQuery)%7C%7Cl>m.fn.jquery%7C%7Ck(m))%7Bp=j.createElement(%22script%22);p.type=%22text/javascript%22;p.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+l+%22/jquery.min.js%22;p.onload=p.onreadystatechange=function()%7Bif(!i&&(!(o=this.readyState)%7C%7Co==%22loaded%22%7C%7Co==%22complete%22))%7Bk((m=n.jQuery).noConflict(1),i=1);m(p).remove()%7D%7D;j.documentElement.childNodes%5B0%5D.appendChild(p)%7D%7D)(window,document,%221.7.1%22,function(e,c)%7Bvar%20b=e(e(%22table%20table%22).get(1)).find(%22tbody%20tr%5Bstyle%5D%22);function%20f(h)%7Bvar%20k,g,l,m,j,n,i;k=h.prev();g=k.find(%22span%22).text();l=g.split(%22%20%22)%5B0%5D*1;m=k.text().split(%22%20%22)%5B4%5D;j=k.text().split(%22%20%22)%5B5%5D;n=null;if(j===%22minutes%22%7C%7Cj===%22minute%22)%7Bn=1%7Dif(j===%22hours%22%7C%7Cj===%22hour%22)%7Bn=60%7Dif(j===%22days%22%7C%7Cj===%22day%22)%7Bn=60*24%7Di=(m*n)/60;return%7Bpoints:l,time:i%7D%7Dfunction%20d(h,g)%7Breturn(h-1)/Math.pow((g+2),1.5)%7Dfunction%20a( |
This file contains hidden or 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
| $ git clone https://github.com/JasonGiedymin/backbone-todojs-coffeescript |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or 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
| # Generated files | |
| # Node | |
| lib-cov | |
| *.seed | |
| *.log | |
| *.csv | |
| *.dat | |
| *.out |
This file contains hidden or 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> | |
| <meta charset="utf-8"> | |
| <title>Sankey Diagram</title> | |
| <style> | |
| @import url(../style.css?20120521); | |
| #chart { | |
| height: 500px; | |
| } |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Cyclic Sankeys</title> | |
| <style type="text/css"> | |
| #chart { | |
| height: 500px; | |
| } | |
| .node rect { | |
| cursor: move; |
This file contains hidden or 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.exports = -> | |
| output = new stream.Transform(objectMode: true) | |
| output._transform = (file, enc, callback) -> | |
| # Pass this file along (do this *before* finding dependencies to preserve load order) | |
| output.push(file) |
This file contains hidden or 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
| require 'sass' | |
| sass_engine = Sass::Engine.for_file('styles/app.scss', {load_paths: ['styles'], syntax: :scss}) | |
| tree = sass_engine.to_tree | |
| class MyVisitor < Sass::Tree::Visitors::Base | |
| def visit_variable(node) | |
| @environment ||= Sass::Environment.new | |
| var = @environment.var(node.name) |
OlderNewer