- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo nano ~/.bash_profile
- Add
export PATH=/path/to/depot_tools:"$PATH"
(it's important that depot_tools comes first here)
This file contains 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
/** | |
* Copyright 2012 Akseli Palén. | |
* Created 2012-07-15. | |
* Licensed under the MIT license. | |
* | |
* <license> | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files | |
* (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, |
This file contains 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
const collection = [ | |
{ attributeValue: ["RED", "GOLD"] }, | |
{ attributeValue: ["16G", "32G", "64G"] }, | |
{ attributeValue: ["PLUS"] } | |
] | |
function cartesian(data) { | |
const f = (a,b) => [].concat(...a.map(d => b.map(e => [].concat(d, e)))) | |
const recurse = (a, b, ...c) => (b? recurse(f(a, b), ...c): a) | |
return recurse(...data) |
This file contains 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
curl -w "@curl-format.txt" -o /dev/null -s http://www.aduanacol.com |
- https://www.facebook.com/dangnhdev
- https://www.facebook.com/phingocchi
- https://www.facebook.com/haint504
- https://www.facebook.com/NghiaLeMinh
- https://www.facebook.com/dungba88
- https://www.facebook.com/bachden
- https://www.facebook.com/pham.phuong.tu
- https://www.facebook.com/huy
- https://www.facebook.com/thanhtu.pham.12914
- https://www.facebook.com/hung.stanford
This file contains 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
/* Parse a string function definition and return a function object. Does not use eval. | |
* @param {string} str | |
* @return {function} | |
* | |
* Example: | |
* var f = function (x, y) { return x * y; }; | |
* var g = parseFunction(f.toString()); | |
* g(33, 3); //=> 99 | |
*/ | |
function parseFunction (str) { |
Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.
loosely based on https://gist.github.com/bnerd/2011232
// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory
This file contains 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 http = require('http') | |
var fs = require('fs') | |
var argv = require('optimist').argv | |
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/ | |
var link = argv._.toString() | |
var videoID = link.match(rxVideoID)[1] | |
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) { | |
var chunks = [] |
FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
OlderNewer