This document is meant to serve as a repository of best practices for large, multi-environment source control management.
Table of Contents
- Make sure the domain you picked points at the IP of your Redash server.
- Switch to the
rootuser (sudo su). - Create a folder named
nginxin/opt/redash. - Create in the nginx folder two additional folders:
certsandcerts-data. - Create the file
/opt/redash/nginx/nginx.confand place the following in it: (replaceexample.redashapp.comwith your domain name)upstream redash { server redash:5000; }
This document is meant to serve as a repository of best practices for large, multi-environment source control management.
Table of Contents
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
- Host a static website at S3
- Redirect
www.website.comtowebsite.com - Website can be an SPA (requiring all requests to return
index.html) - Free AWS SSL certs
- Deployment with CDN invalidation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const puppeteer = require('puppeteer'); | |
| function sleep(ms){ | |
| return new Promise(resolve=>{ | |
| setTimeout(resolve,ms) | |
| }) | |
| } | |
| (async() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Shell Script to Update AWS EC2 Security Groups | |
| # Note that existing IP rules will be deleted | |
| # CONFIG - Only edit the below lines to setup the script | |
| # =============================== | |
| # AWS Profile Name | |
| profile="name1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "thewheat/code", | |
| "authors": [ | |
| { | |
| "name": "Timothy Lim", | |
| "email": "tim.lim@intercom.io" | |
| } | |
| ], | |
| "require": { | |
| "google/apiclient": "^2.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // License: MIT, feel free to use it! | |
| const Intercom = require('intercom-client'); | |
| const appId = 'APP_ID' | |
| const apiKey = 'APP_KEY' | |
| const client = new Intercom.Client(appId, apiKey); | |
| const async = require('async-q') | |
| //REF: https://developers.intercom.com/reference#iterating-over-all-users | |
| //WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # Search for, select, and execute command from history DB using FZF | |
| # Inspired by http://junegunn.kr/2015/04/browsing-chrome-history-with-fzf/ | |
| h(){ | |
| local sep query | |
| sep='{::}' | |
| query="SELECT cmd, count(*) as frequency | |
| FROM hist | |
| GROUP BY cmd |
NewerOlder