Install packages
yarn add firebase-admin jsonwebtoken ms nanoid
# or
#!/bin/sh | |
set -e | |
#set -x | |
usage () { | |
cat <<EOF | |
Usage: $0 [-v|--verbose] [-h|--help] [-f|--from "dirs on camera"] [-t|--to "backup location"] camera_ip | |
EOF | |
} |
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
// hard won knowledge from http://stackoverflow.com/questions/20035615/using-raw-image-data-from-ajax-request-for-data-uri | |
var xmlHTTP = xhr.XMLHttpRequest(); | |
xmlHTTP.open('GET', url, true); | |
xmlHTTP.responseType = 'arraybuffer'; | |
xmlHTTP.onload = function(e) { | |
var arr = new Uint8Array(this.response); | |
var raw = String.fromCharCode.apply(null,arr); | |
var b64 = base64.encode(raw); | |
var dataURL="data:image/png;base64," + b64; | |
}; |
How to install the latest stable version of MongoDB on OS X 10.11 (El Capitan).
Make sure you have Homebrew installed before following the different steps documented below.
Important notice: When installing Homebrew on El Capitan there is an important article you should read first: Homebrew and El Capitan
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// For Yoast SEO Plugin Version: 14.1+ add to your Wordpress Theme's functions.php... | |
// Remove All Yoast HTML Comments | |
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076 | |
// Credit @devendrabhandari (https://gist.github.com/paulcollett/4c81c4f6eb85334ba076#gistcomment-3303423) | |
add_filter( 'wpseo_debug_markers', '__return_false' ); | |
// For Yoast SEO Plugin Version: < 14.1 add to your Wordpress Theme's functions.php... |
<?php | |
/** | |
* Todo: Send a random user agent string and sleep a random amount between requests. | |
*/ | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
// Extract and sanatize input: | |
$domain = filter_input(INPUT_POST, 'domain', FILTER_SANITIZE_URL); | |
$terms = filter_input(INPUT_POST, 'terms', FILTER_SANITIZE_STRING); | |
// Setup Goutte (which also includes Guzzle): |