- Install jsgrep
- Convert your source code using
node spatch-cli.js es5-to-es3.spatch source.js // yields the converted source
- Prepare the implementation of ES5 by implemeting the missing polyfills in es5.js
- Concat es5.js and the converted code
- Wrap the result of the previous steps in a closure and export your object
this.Element && function(ElementPrototype) { | |
ElementPrototype.matchesSelector = ElementPrototype.matchesSelector || | |
ElementPrototype.mozMatchesSelector || | |
ElementPrototype.msMatchesSelector || | |
ElementPrototype.oMatchesSelector || | |
ElementPrototype.webkitMatchesSelector || | |
function (selector) { | |
var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; | |
while (nodes[++i] && nodes[i] != node); |
public class WebApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" }) | |
} | |
} |
#!/bin/sh | |
# Written by Mike Ensor ([email protected]) | |
# Copywrite 2012 | |
# Use as needed, modify, have fun! | |
# This is intended to be used for Maven3 + Mac OSX | |
# | |
# To use: | |
# in your ".bashrc" or ".bash_profile" add the following line: | |
# source ~/<path to script>/colorize-maven.sh |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
#Error management in gulp
Sucking at something is the first step to becoming sorta good at something
No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.
We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js
that contains this code (we modified it a little bit to be closer to real-usage):
var coffee = require('gulp-coffee');
/*! | |
* jQuery JavaScript Library v2.1.1pre | |
* http://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ | |
* | |
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license | |
* http://jquery.org/license |
You can't uninstall, you can't reset your profile and as long as your pin is valid on the Nike server it will continue to log your workouts to some diconnected account on their end. To fix this, you have to get your iPhone to invalidate your account.
-
Install the trial version of Charles http://www.charlesproxy.com/download/
-
Download the Charles certs and install them on your iPhone http://www.charlesproxy.com/ssl.zip
-
Create a local map in Charles from
https://nikeplus.nike.com/nikeplus/v1/services/device/get_pin_status.jsp
to a local file with the following content.
@mixin grid($cols: 1, $gutter: 0, $childs: ".item") { | |
width: auto; | |
margin-right: -$gutter; | |
#{$childs} { | |
float: left; | |
width: (100% / $cols); | |
padding-right: $gutter; | |
background-clip: content-box; |