- RequetBin - http://requestb.in/
- NGrok - https://ngrok.com/
- Man In the Middle Proxy - http://mitmproxy.org/
- PostMan - http://getpostman.com/
- Hurl.it - http://www.hurl.it/
- PonyDebugger - https://github.com/square/PonyDebugger
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
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
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
| WebPDecodeAndDraw = function (data) { | |
| var decoder = new WebPDecoder(); | |
| var bitmap = decoder.WebPDecode(data, data.length); | |
| if (bitmap) { | |
| //Draw Image | |
| var output = ctx.createImageData(canvas.width, canvas.height); | |
| var biWidth = canvas.width; | |
| var outputData = output.data; |
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
| alert('hello ' + document.location.href); |
#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');
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
| /** | |
| * Polyfill for the vw, vh, vm units Requires StyleFix from -prefix-free | |
| * http://leaverou.github.com/prefixfree/ | |
| * | |
| * @author Lea Verou | |
| * | |
| * Contributor: Xandor Schiefer | |
| * Contributor: Guto Marrara Marzagão | |
| * | |
| */ |
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
| /** | |
| * This file/module contains all configuration for the build process. | |
| */ | |
| /** | |
| * Load requires and directory resources | |
| */ | |
| var join = require('path').join, | |
| bowerrc = JSON.parse(require('fs').readFileSync('./.bowerrc', {encoding: 'utf8'})), | |
| bowerJSON = bowerrc.json.replace(/^\.?\/?/, './'), |
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(define){define(function(require,exports,module){ | |
| //... | |
| });})(typeof define=='function'&&define.amd?define | |
| :(function(n,w){'use strict';return typeof module=='object'?function(c){ | |
| c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){ | |
| return w[n];},m.exports,m);w[n]=m.exports;};})('module-name',this)); |
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 node | |
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| * Modified from https://gist.github.com/paolorossi/1993068 | |
| */ | |
| var http = require('http') | |
| , fs = require('fs') | |
| , util = require('util') |