Skip to content

Instantly share code, notes, and snippets.

View suhanlee's full-sized avatar
:octocat:
Focusing

kyle suhanlee

:octocat:
Focusing
View GitHub Profile
@suhanlee
suhanlee / gist:a03161d167e02290af12675d4ec31287
Created November 1, 2017 19:14 — forked from dustismo/gist:6203329
How to install leveldb on ubuntu
sudo apt-get install libsnappy-dev
wget https://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz
tar -xzf leveldb-1.9.0.tar.gz
cd leveldb-1.9.0
make
sudo mv libleveldb.* /usr/local/lib
cd include
sudo cp -R leveldb /usr/local/include
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
@suhanlee
suhanlee / webpack.config.js
Created May 6, 2018 21:19 — forked from tschoffelen/webpack.config.js
Tricking PHPStorm in supporting React Native path aliases.
/**
* Why is this here you ask? React Native doesn't use Webpack. True. This file is here to trick
* IDEA in recognizing module aliases (see the package.json files in some of the subdirs).
* Nice solution? No. Does it work? Sure.
* Tracker URL: https://youtrack.jetbrains.com/issue/WEB-23221
*
* - TS
*/
const fs = require('fs')
@suhanlee
suhanlee / S3-Static-Sites.md
Created June 24, 2019 18:22 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

Mix.install(
[
{:phoenix_playground, "~> 0.1.0"},
{:openai, "~> 0.6.1"}
],
config: [
openai: [
api_key: System.get_env("OPENAI_API_KEY"),
organization_key: System.get_env("OPENAI_ORGANIZATION_KEY")
]