Skip to content

Instantly share code, notes, and snippets.

View MarcL's full-sized avatar
🎉
Doing exciting things @netlify! 🎉

Marc Littlemore MarcL

🎉
Doing exciting things @netlify! 🎉
View GitHub Profile
@MarcL
MarcL / README.md
Last active January 15, 2019 16:30
Move a BitBucket repository to GitHub
@MarcL
MarcL / cryptocompare-express-server.js
Last active March 18, 2018 21:45
Express endpoint to perform CryptoCompare request and Chatfuel response
const express = require('express');
const app = express();
const requestPromise = require('request-promise');
// Call this from JSON API like this:
//
// https://myserver.com/crypto?fromCurrency=gbp&toCurrency=btc&amount=32.67
//
app.get('/crypto', (request, response) => {
// NOTE: There is no error checking for amount existing and from/to currencies being valid symbols
@MarcL
MarcL / server.js
Last active January 16, 2018 10:23
Example of Node.js + Express server to parse url parameters and respond with Chatfuel text messages
const express = require('express');
const app = express();
// Call this from JSON API like this:
//
// https://myserver.com/united+states+of+america/12345
//
app.get('/:country/:productId', (request, response) => {
// Get the country and productId
@MarcL
MarcL / server.js
Created January 16, 2018 09:08
Quick Node.js Express endpoint to redirect to a Messenger page
const express = require('express');
const app = express();
// Call this from JSON API like this:
//
// https://myserver.com/1920147214903175/GetEBook
//
app.get('/:fbpage/:reference', (request, response) => {
// Get the page and reference
// NOTE: There is no error checking here so it assumes that the parameters are always passed
@MarcL
MarcL / server.js
Created November 28, 2017 23:34
Node.js Code for Chatfuel Joke Bot - https://www.youtube.com/watch?v=oLFOy0f4AFQ
// server.js
// where your node app starts
// init project
var express = require('express');
var app = express();
var requestPromise = require('request-promise');
// we've started you off with Express,
// but feel free to use whatever libs or frameworks you'd like through `package.json`.
@MarcL
MarcL / phaser-speedup.md
Created March 10, 2017 09:19
Tips on speeding up Phaser games