View python-es6-comparison.md

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
View tutorial.md

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

View 01_complete_authentication_as_api.md

Complete authentication as API including OAuth2 endpoints

I implemented an auth API for a SPA. This is rarely documented and therefore I want to share here how I did it hoping it will be a help for others.

We are still working on it and I'll update this document accordingly.

This tutorial uses following versions:

Package Version
View cdb.sh
function cdb() {
if [ -d "$PWD/$1" ]; then
command cd "$1"
return
fi
if [ "$1" = '-' ]; then
command cd -
return
fi
View multiple-ssh-authkeys.md

Step 1: Generate first ssh key Type the following command to generate your first public and private key on a local workstation. Next provide the required input or accept the defaults. Please do not change the filename and directory location.

workstation 1 $ ssh-keygen -t rsa

Finally, copy your public key to your remote server using scp

View hosts
# ---------------------------------------------------
# Vimeo
# ---------------------------------------------------
151.101.64.217 player.vimeo.com
151.101.129.194 vimeo-hp-videos.global.ssl.fastly.net
151.101.66.109 f.vimeocdn.com
151.101.64.217 vimeo.com
151.101.130.109 i.vimeocdn.com
151.101.64.217 developer.vimeo.com
View heroku_deploy.md

Deploy to Heroku

Heroku

Heroku is a free hosting service for hosting small projects. Easy setup and deploy from the command line via git.

Pros
  • Easy setup
  • Free
View remote-file-exists.php
<?php
// Source: http://goo.gl/aZ1h8v
$file_headers = @get_headers($url);
if ($file_headers[0] == 'HTTP/1.0 404 Not Found'){ // or "HTTP/1.1 404 Not Found" etc.
$file_exists = false;
} else {
$file_exists = true;
}
View deps.js
var child_process = require('child_process');
function install(modules, callback) {
if (modules.length == 0) {
if (callback) callback(null);
return;
}
var module = modules.shift();
child_process.exec(
'npm install ' + module,