Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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); |
const mapper5 = (keys, v, o) => { | |
if (keys.length === 0) { | |
return o; | |
} | |
if (keys.length === 1) { | |
return { ...o, [keys[0]]: v }; | |
} | |
const key = keys[0]; | |
const isNextKeyForArray = /[0-9]+/.test(keys[1] || ''); |
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |
# | |
# application entry points | |
# https://www.example.com/ (production) | |
# https://demo.example.com/ (demo/lite production) | |
# https://devel.example.com/ (development) | |
# | |
# static content served by nginx server | |
# http://app-be1.example.net:4xxx/ | |
# http://app-be2.example.net:4xxx/ | |
# |