chmod +x set_heroku_env.sh
./set_heroku_env.sh
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
#!/usr/bin/env bash | |
# 1. Run this script file | |
# bash <(curl -Ls https://bit.ly/3swaoUr) | |
# Homebrew & Apps | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
brew update |
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
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
- webpack.config.js | |
- postcss.config.js | |
- config.js | |
- addons.js |
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
function _normalizeString(value) { | |
return value | |
.toString() | |
.replace(/á|ã|â/g, 'a') | |
.replace(/é|ê/g, 'e') | |
.replace(/í/g, 'i') | |
.replace(/ó|ô|õ/g, 'o') | |
.replace(/ú/g, 'u') | |
.replace(/ç/g, 'c') | |
.replace(/_/g, ''); |
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
xcode-select --install | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew cask install iterm2 | |
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts | |
brew install bash # latest version of bash | |
# set brew bash as default shell | |
brew install fortune | |
brew install cowsay | |
brew install git |
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
function fixImageMaps(force) { | |
var imgs = document.querySelectorAll("img[usemap]"); | |
[].forEach.call(imgs, function(img) { | |
if (!img.naturalHeight) { return; } | |
var h = img.height / img.naturalHeight; | |
var w = img.width / img.naturalWidth; | |
var map = document.getElementsByName(img.useMap.slice(1))[0]; | |
if (!map) { return; } | |
for (var i = 0; i < map.children.length; i++) { | |
var area = map.children[i]; |
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 fs = require('fs'); | |
// Monkey-patch react-dev-utils to get the error overlay with SSR | |
const pathToDevClient = 'node_modules/react-dev-utils/webpackHotDevClient.js'; | |
// The react-scripts default | |
const reactScriptsPort = 3000; | |
// Read the dev client out of node_modules | |
const HotDevClient = fs.readFileSync(pathToDevClient, 'utf8'); |
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
NewerOlder