create package.js
npm init -y
create tsconfig.json
tsc --init
install deps
1) Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query |
license: gpl-3.0 | |
height: 600 |
create package.js
npm init -y
create tsconfig.json
tsc --init
install deps
// Follow the instructions here: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ | |
// | |
// That'll get you 80% of the way there. Unfortunately, you'll run into CORS and MIMETYPE errors, so make the following changes. | |
// ============================================================ | |
// Your clientside script should actually look like this (jquery example): | |
// ============================================================ | |
var data = {email: "[email protected]"} |
// Create or open an existing Sheet and click Tools > Script editor and enter the code below | |
// 1. Enter sheet name where data is to be written below | |
var SHEET_NAME = "Sheet1"; | |
// 2. Run > setup | |
// 3. Publish > Deploy as web app | |
// - enter Project Version name and click 'Save New Version' | |
// - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously) | |
// 4. Copy the 'Current web app URL' and post this in your form/script action | |
// 5. Insert column names on your destination sheet matching the parameter names of the data you are passing in (exactly matching case) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Note (November 2016): | |
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name yourserver.com; | |
root /path/to/your/htdocs; |
#####EDIT: NB Ban is technically different from Purge. Banned objects remain in memory but banning is faster than purging. Read the Varnish 3 documentation here and here.
Purge may be a more appropriate action for your use-case; although the examples in the gist below work, it's not necessarily the best way of doing this.
Want to deploy an existing node.js Github project on OpenShift?
Give this recipe a try:
cd $YOUR_PROJECT_FOLDER # This script assumes that your project is a git repo, with a git remote hosted on github.com
git remote add upstream -m master [email protected]:ryanj/nodejs-custom-version-openshift.git
git pull -s recursive upstream master # merge in a basic OpenShift skeleton