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
/* | |
* Autoslug's because we'd all rather be lazy. | |
* The CMW uses Prototype. I like jQuery. | |
*/ | |
/* @Source */ | |
(function(d,t){ | |
var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | |
g.src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'; | |
s.parentNode.insertBefore(g,s); |
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
/* ~ line 122 + | |
* First attempt to add the doctype was to hardcode it in place of smith.window.document.doctype. | |
* This added the doctype to the output argument of each renderer, but that didn’t apply to what was written to disk. | |
*/ | |
smith.renderers.forEach( function (renderer) { | |
// Grabs the name given to the generator. | |
var name = Object.keys(renderer)[0]; | |
smith.log.info('Rendering "'+name+'"'); |
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
yepnope([ | |
{ | |
test : categorizr.isMobile, | |
, yep : ['mobile-specific.js', 'mobile-specific.css'] | |
} | |
, { | |
test : categorizr.isTablet, | |
, yep : ['tablet-specific.js', 'tablet-specifc.css'] | |
} | |
, { |
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
# PORCELAIN | |
# set an upstream tracking branch. | |
git push -u origin development | |
# get an external URL and make a copy of it on your machine | |
git clone [email protected]:Skookum/mason.git | |
# PLUMBING |
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
# It is smart enough to know that this is a Github user and requests | |
# the appropriate URL | |
git pull Skookum/categorizr.js | |
# Use your git text editor to compose pull requests. No longer do you | |
# need to break out of your normal workflow in terminal to go to | |
# github.com to write your pull request. | |
git pull request | |
# Create a git repo on github.com |
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
((name, context, definition) -> | |
if typeof module isnt "undefined" | |
module.exports = definition(name, context) | |
else if typeof define is "function" and typeof define.amd is "object" | |
define definition | |
else | |
context[name] = definition(name, context) | |
) "moduleName", this, (name, context) -> | |
# module code it up |
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
var path = require('path'); | |
module.exports = function(app) { | |
app.get('/dashboard', app.user.loggedIn, function(req, res) { | |
return res.render(path.join(__dirname, 'home/dashboard'), { | |
user: req.session.user | |
}); | |
}); |
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
$('body').on('click', 'a[data-toggle=tab]', function(e) { | |
var self = $(this) | |
, target = self.attr('href') | |
, actives = self.closest('.tabs').find('.active') | |
actives.removeClass('active') | |
self.addClass('active') | |
target.addClass('active') | |
}) |
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
// option 1 | |
var Subscription = function (plan) { | |
var self = this; | |
// statics | |
_.each(['dropdown_text full_rate id months name renew_rate special type'].split(' '), | |
function(prop) { this[prop] = ko.observable(plan[prop]); }) | |
this.monthly_rate = ko.computed(function () { | |
return (self.full_rate() / self.months()).toFixed(2); | |
}); |
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
(function(El) { | |
El.on = function(type, el, callback) { | |
if ('function' === typeof el) { | |
callback = el | |
el = null | |
} | |
this.addEventListener(type, function (e) { | |
if (!el || e.target.matchesSelector(el)) | |
return callback(e) |
OlderNewer