To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
# Reference Backbone ajax function | |
_ajax = Backbone.ajax | |
requestQueue = [] | |
requestPending = false | |
sendRequest = (options, promise, trigger=true) -> | |
options = _.clone options | |
if trigger | |
requestPending = true |
// Virbone.View is a subclass of Backbone.View, with our own customizations of event-handling | |
MyView = Virbone.View.extend({ | |
modelEvents: { | |
// the binding of modelEvents knows the special keywords | |
// `model` and `collection` | |
"change:data model": "onDataUpdate", | |
"add collection": "onModelAdded", | |
// if the subject is other than `model` and `collection`, | |
// the subject-key is looked up in the options-object | |
"change:otherData otherModelInOptions": "onOtherDataUpdate" |
## In the function binding the events | |
_.bindAll(@, callbackName) | |
callback = @[callbackName] | |
# Bind callback to this | |
model.bind(event, callback) | |
# Store event, to unbind later | |
evt = [event, model, callback] | |
@_boundEvents.push(evt) |
# Copyright: Benjamin Weiss (keyboardsurfer) https://github.com/keyboardsurfer | |
# Under CC-BY-SA V3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode) | |
# built application files | |
*.apk | |
*.ap_ | |
*.jar | |
!gradle/wrapper/gradle-wrapper.jar | |
# lint folder |
(function($) { | |
function parseImagesFromCSS(doc) { | |
var i, j, | |
rule, | |
image, | |
pattern = /url\((.*)\)/, | |
properties = ['background-image', '-webkit-border-image'], | |
images = {}; | |
if (doc.styleSheets) { |
/** | |
* Moves a model to the given index, if different from its current index. Handy | |
* for shuffling models about after they've been pulled into a new position via | |
* drag and drop. | |
*/ | |
Backbone.Collection.prototype.move = function(model, toIndex) { | |
var fromIndex = this.indexOf(model) | |
if (fromIndex == -1) { | |
throw new Error("Can't move a model that's not in the collection") | |
} |
########################################## | |
# | |
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 | |
# | |
# Version 2.82 | |
# | |
# Latest Change: | |
# - MORE tweaks to get the iOS 10+ and 9- working | |
# - Support iOS 10+ | |
# - Corrected typo for iOS 1-10+ (thanks @stuikomma) |
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |
var FadeTransitionRegion = Backbone.Marionette.Region.extend({ | |
show: function(view){ | |
this.ensureEl(); | |
view.render(); | |
this.close(function() { | |
if (this.currentView && this.currentView !== view) { return; } | |
this.currentView = view; |