For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
/** | |
* hexagon clip-path | |
*/ | |
div | |
{ | |
width: 400px; | |
height: 346px; /* ½√3 × width */ | |
position: relative; | |
overflow: hidden; |
# ATTENTION PLEASE! | |
# NOTE BY @riwazp7 | |
# Note for future visitors of this gist: Mac OS has Apache Benchmark by default ab --help | |
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz | |
tar -xzf libtool-2.4.2.tar.gz | |
cd libtool-2.4.2 | |
./configure && make && sudo make install | |
# brew install 'https://raw.github.com/simonair/homebrew-dupes/e5177ef4fc82ae5246842e5a544124722c9e975b/ab.rb' |
Elastic Load Balancer, CloudFront and Let's Encrypt |
## Global install of the app generator | |
npm install -g create-react-app | |
## Setup the app (first-time only) | |
create-react-app my-app | |
cd my-app | |
git init | |
# Create the Heroku app; requires free account at https://www.heroku.com/ | |
heroku create -b https://github.com/heroku/heroku-buildpack-static.git |
const { docClient } = require('../services/dynamodb') | |
exports.findAllItems = async function* () { | |
let response = {} | |
let ExclusiveStartKey | |
do { | |
response = await docClient.scan({ | |
TableName: 'mytable', | |
Limit: 500, | |
ExclusiveStartKey |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create
. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.
Note that on Heroku, you must always use master
as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch
seen below (in this example, we push the local staging
branch to the master
branch on heroku.
$ git remote add staging https://git.heroku.com/staging-app.git
// ts 3.6x | |
function debounce<T extends Function>(cb: T, wait = 20) { | |
let h = 0; | |
let callable = (...args: any) => { | |
clearTimeout(h); | |
h = setTimeout(() => cb(...args), wait); | |
}; | |
return <T>(<any>callable); | |
} |