Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| echo "Creating an SSH key for you..." | |
| ssh-keygen -t rsa | |
| echo "Please add this public key to Github \n" | |
| echo "https://github.com/account/ssh \n" | |
| read -p "Press [Enter] key after this..." | |
| echo "Installing xcode-stuff" | |
| xcode-select --install |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| Backbone.Model.extend({ | |
| /** | |
| * Return the model itself instead of fetched-data object | |
| * @param {Object} [options] | |
| * @returns {jQuery} | |
| */ | |
| fetch: function (options) { | |
| options = options || {}; | |
| var self = this; |
| var Model = Backbone.Model.extend({ | |
| get: function (attribute) { | |
| var value = Backbone.Model.prototype.get.call(this, attribute); | |
| if(_.isFunction(value)) { | |
| value = value.call(this); | |
| } | |
| return value; |
| "use strict"; | |
| function jsonToSassVars (obj, indent) { | |
| // Make object root properties into sass variables | |
| var sass = ""; | |
| for (var key in obj) { | |
| sass += "$" + key + ":" + JSON.stringify(obj[key], null, indent) + ";\n"; | |
| } | |
| // Store string values (so they remain unaffected) |
| // Marionette.Gauntlet v0.0.0 | |
| // -------------------------- | |
| // | |
| // Build wizard-style workflows with an event-emitting state machine | |
| // Requires Backbone.Picky (http://github.com/derickbailey/backbone.picky) | |
| // | |
| // Copyright (C) 2012 Muted Solutions, LLC. | |
| // Distributed under MIT license | |
| Marionette.Gauntlet = (function(Backbone, Picky, Marionette, $, _){ |
| // This is heavily based on Backbone.SubRoute (https://github.com/ModelN/backbone.subroute) by Dave Cadwallader, who | |
| // helped me out in this discussion thread: | |
| // https://groups.google.com/forum/?fromgroups=#!topic/backbone-marionette/KTw7USoA6Gs | |
| ;define([ | |
| 'underscore', | |
| 'marionette' | |
| ], | |
| /** | |
| * A module that defines and adds Marionette.SubAppRouter to the Marionette object |