Skip to content

Instantly share code, notes, and snippets.

View LucienPerouze's full-sized avatar

Lucien Perouze LucienPerouze

View GitHub Profile
@LucienPerouze
LucienPerouze / build.gradle
Created January 28, 2019 14:38
Gradle config
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 26
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "15.0.1"
@LucienPerouze
LucienPerouze / index.js
Last active January 31, 2020 00:34
Lambda@Edge function to replace metas in S3 bucket
'use strict';
const https = require('https'); // Replace with http if necessary
const path = require('path');
// Build our own fetch
const fetchUrl = (url) => {
return new Promise((resolve, reject) => {
https.get(url, distant => {
let response = '';
@LucienPerouze
LucienPerouze / index.html
Created April 29, 2018 01:27
Templating example for react server side rendering with Lambda@Edge
<meta property="og:url" content="%SERVER_META_URL%" />
<meta property="og:type" content="%SERVER_META_TYPE%" />
<meta property="og:title" content="%SERVER_META_TITLE%" />
<meta property="og:description" content="%SERVER_META_DESCRIPTION%" />
<meta property="og:image" content="%SERVER_META_IMAGE%" />
/**
* My API Sandbox
*
*/
Sandbox.define('/addMessage','POST', function(req, res){
if (!req.is('application/json')) {
return res.send(400, 'Invalid content type, expected application/json');
}
@LucienPerouze
LucienPerouze / .block
Last active December 14, 2017 16:56
Debating + Recommendations Visualization
license: mit