Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Simply expose a global (eg in main.js
)
window.au = el => {
let aureliaNode = el;
// go up the structure until an element affected by aurelia is found
while (aureliaNode !== null && aureliaNode !== undefined && aureliaNode.au === undefined) {
aureliaNode = aureliaNode.parentNode;
}
var gulp = require('gulp'); | |
var bundler = require('aurelia-bundler'); | |
var paths = require('../paths'); | |
var config = { | |
force: true, | |
packagePath: '.', | |
bundles: { | |
"app/dist/app-build": { | |
includes: [ |
dependencies: | |
pre: | |
- | | |
npm login <<! | |
$NPM_USERNAME | |
$NPM_PASSWORD | |
$NPM_EMAIL! |
[Unit] | |
Description=logentires.service | |
[Service] | |
Environment=ACCESS_TOKEN=YOUR_LOGENTRIES_ACCESS_TOKEN | |
ExecStart=/bin/sh -c 'journalctl -o short -f | sed \"s/^/${ACCESS_TOKEN} \\0/g\" | ncat data.logentries.com 10000' |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Start your rethinkdb instance with this flag:
--bind all
(or bind=all
in the configuration file for your instance)
Block external access to the web UI with these two commands:
sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP
sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT
Install nginx:
sudo apt-get install nginx