Skip to content

Instantly share code, notes, and snippets.

View albacoretuna's full-sized avatar

Nick O. albacoretuna

View GitHub Profile
@albacoretuna
albacoretuna / port-forwarding-mac.md
Last active November 19, 2019 14:44
Serving a create react app locally with backend api

Enable port forwarding on mac locally

Imagine you'd like to use account.exapmle.com from your local dev machine, but with the backend api.

  1. Change your hosts file:
sudo vim /etc/hosts
@albacoretuna
albacoretuna / port-forwarding-mac.md
Created November 13, 2019 12:11
Serving a create react app locally with backend api

Port forwarding on mac locally

Imagine you'd like to use account.exapmle.com from your local dev machine, but with the backend api.

  1. You need to change your hosts file:
sudo vim /etc/hosts

127.0.0.1 account.example.com

Keybase proof

I hereby claim:

  • I am albacoretuna on github.
  • I am nickokapi (https://keybase.io/nickokapi) on keybase.
  • I have a public key ASDZMucH176p9UobeaTE64jOInC2OR6gbCEadt3ALnFddAo

To claim this, I am signing this object:

<html class="gr__s_codepen_io"><head>
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/x-icon" href="https://production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico">
<link rel="mask-icon" type="" href="https://production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111">
<title>CodePen - A Pen by Omid H</title>
`;;;;;;
.@@@@@@
.@@+ @@@@@@+
`;@+ ;;;;;@+ @@@@@@@@@@@@@@@@@@@@@@
@@@+ @@@@@ @ @
;;@+ ;;;'@ @@@@@@@ @@@@@@@
@@@@@ .@@@ @@@@@@@ @@@@@@@
@;; .@;, @@@@@@@ @@@@@@@
@@@ .@@+ @@@@ @@@@@
@albacoretuna
albacoretuna / nginx_config_beanstalk.yaml
Created February 13, 2017 15:23
Nginx configuration for aws beanstalk, enables gzip, sets up node proxy
# All nginx configurations can go here
files:
# This creates a file at the address below on the beanstalk instance
/etc/nginx/conf.d/proxy.conf:
mode: "000644"
owner: root
group: root
content: |
upstream nodejs {
server 127.0.0.1:8081;
# from https://gist.github.com/sindresorhus/7996717
curl -O https://gist.githubusercontent.com/sindresorhus/7996717/raw/4ec63bc6f8c0f1e227faeb78eddc01a788ef0595/post-merge && chmod +x post-merge && mv post-merge .git/hooks/
/*
var async = true;
var xhr = new XMLHttpRequest();
xhr.open('get', 'favicon.ico', async);
xhr.send();
var timestamp = Date.now() + 3000;
while(Date.now() < timestamp);
@albacoretuna
albacoretuna / bash-cheatsheet.sh
Created November 4, 2016 08:06 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
"use strict";
const request = require('request-promise');
const headers = {
'User-Agent': 'scottwrobinson'
};
const repos = [
'scottwrobinson/camo',