Skip to content

Instantly share code, notes, and snippets.

View AlexHg's full-sized avatar

Alejandro Hernandez AlexHg

View GitHub Profile
@AlexHg
AlexHg / gist:0ecd20be89453b77cf2e0076940a2ed1
Created April 19, 2023 02:48
Reverse Proxy in Lambda@Edge + Cloudfront
'use strict';
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const destDomain = 'gst.giver.014qa.net'
const destUri = event.Records[0].cf.request['uri']
const ipClient = event.Records[0].cf.request.headers['x-forwarded-for'][0]['value']
request.origin = {
@AlexHg
AlexHg / 00-elastic_ip.config
Last active March 26, 2020 22:20
.ebextensions/00-elastic_ip.config is an autoasignable elastic ip script for AWS Elastic Beanstalk
packages:
yum:
jq: []
files:
"/opt/elasticbeanstalk/bin/eipalloc.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
@AlexHg
AlexHg / index.html
Created July 2, 2019 15:16
Pokemon Let's Go! (ui)
<main id=app>
<List></List>
<img class="logo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/98/International_Pok%C3%A9mon_logo.svg/1280px-International_Pok%C3%A9mon_logo.svg.png"/>
</main>
@AlexHg
AlexHg / index.html
Created July 2, 2019 15:16
Warcraft Tooltips
<header class="page">
<h2>Warcraft Tooltips</h2>
<h3>with css, handlebars and some jQuery</h3>
</header>
<div class="bag">
<header>Backpack</header>
<i class="wow-icon"
@AlexHg
AlexHg / index.html
Created June 22, 2019 18:28
Roulette Wheel
<input type="button" value="spin" style="float:left;" id='spin' />
<canvas id="canvas" width="500" height="500"></canvas> j