Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
var oauth = require('oauth') | |
, request = require('request') | |
; | |
module.exports = function(app, params, cb) { | |
if(!params.consumer_key) { throw new Error('Please provide a consumer key.'); } | |
if(!params.consumer_secret) { throw new Error('Please provide a consumer secret.'); } | |
if(!params.callback_url) { throw new Error('Please provide callback url.'); } | |
if(!cb) { throw new Error('Please provide a callback'); } |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
function get_smc_dnt() { | |
/* | |
* Do Not Track for privacy. | |
* When this feature is enabled, webpage should exclude all tracking tools, | |
* like Google Analytic and advertising networks | |
*/ | |
// returns TRUE if DNT is on and is equal to 1, | |
// returns FALSE if DNT is unset OR not equal to 1 | |
return (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == 1); | |
} |
/* | |
IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong, | |
because it must be keyed with at least 128 bits of entropy, and where | |
do you get this entropy, huh? | |
- In a browser, you get it from window.crypto.getRandomValues(). | |
- In Node, you get it from crypto.randomBytes() | |
Now LOOK AT YOU! You already have secure ways to generate random bytes, |
The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:
export
syntax, without breaking consumers that do require("function-module")()
?import
syntax, while not demanding that the module author rewrites his code to ES6 export
?@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.
This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.
#!/bin/bash | |
# We want to clear out the "rc" branch. To do that, we need | |
# to be on a different branch. We'll get onto "master". | |
# Does master exist? The first command's status code | |
# will be "0" if the branch exists. | |
git show-ref --verify --quiet refs/heads/master | |
MASTER_EXISTS=$? |
/** | |
* @param {Function} fn Function to curry. | |
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length | |
* @returns {Function} The currified function. | |
*/ | |
function curry(fn, length) { | |
length = length || fn.length; | |
return function currified() { | |
var args = [].slice.call(arguments); |
# sudo /sbin/rcvboxdrv -h | |
# Unloading modules: | |
# Loading modules: modprobe: FATAL: Module vboxnetadp not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxnetflt not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxpci not found in directory /lib/modules/4.4.3-1-ARCH | |
# modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.4.3-1-ARCH | |
# Solution | |
# from https://forum.antergos.com/topic/818/can-t-run-my-vitualbox/4 |