function map (arr, func) { | |
return Promise.resolve().then(function () { | |
return arr.map(function (el) { return func(el) }) | |
}).all() | |
} | |
function mapSeries (arr, func) { | |
let currentPromise = Promise.resolve() | |
let promises = arr.map(function (el) { | |
return currentPromise = currentPromise.then(function () { |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"os/exec" | |
"reflect" | |
"syscall" |
#include <cstdio> | |
#include <string> | |
class MyIOContext { | |
public: | |
std::string datafile; | |
AVIOContext *ioCtx; | |
uint8_t *buffer; // internal buffer for ffmpeg | |
int bufferSize; | |
FILE *fh; |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: lmgrd-simics | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Control Flexera lmgrd license daemon for Simics installation | |
# Description: Control start/stop of lmgrd entry for Simics | |
# |
Conversion script between the TTML & SRT subtitle formats. This is particularly useful with Adobe Premiere, as it doesn't understand the SRT format (which is joyously simple and interoperable). TTML-XML is probably the most straightforward subtitle format it does understand, hence this tool.
Note that due to the simplicity of the SRT format, this conversion is extremely lossy for all the bells and whistles supported by TTML. Not like you'd want fixed-pixel font sizes etc in your subtitles anyway, but you've been warned.
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
Successful mitmproxy-3.7 setup tested on OS X 10.13.6 and iPhone X running 12.1.4
Enable IP forwarding and disable ICMP redirects to keep the iPad sending traffic to the proxy
sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet.ip.redirect=0
net.inet.ip.forwarding
Enable IP forwarding between interfaces
/* | |
* This is based on ayeks's gist. I added a detailed parsing of Leaf 1 and Leaf 2 and higher. | |
* | |
* Fan Zhang | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> | |
#define POW2(n) (1 << n) | |
#define B2MB(b) (b << 20) |