This file contains 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
// index.js | |
ReactDOM.render(<App /> , document.getElementById('root')) | |
if (module.hot) { | |
module.hot.accept('./App', () => { | |
ReactDOM.render(<App />, document.getElementById('root')) | |
}) | |
} | |
// store.js |
This file contains 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
https://git-lfs.github.com/ | |
TIP: if you want to search for files of certain size | |
$ find . -type f -size +100M -exec ls -lh {} \; | |
NOTE: A GitHub subscription to a large storage package was required. | |
$ brew install git-lfs | |
$ git lfs install | |
$ sudo git lfs install --system |
This file contains 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 | |
apk update | |
apk add git | |
apk add nodejs-npm | |
apk add mysql | |
apk add mysql-client | |
apk add ruby | |
cd; git clone https://github.com/rubygems/rubygems.git | |
cd rubygems/ |
This file contains 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
export function getUrlProps(url) { | |
var match = url.match(/^(https?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/); | |
return match && { | |
url: url, | |
protocol: match[1], | |
host: match[2], | |
hostname: match[3], | |
port: match[4], | |
pathname: match[5], | |
search: match[6], |
This file contains 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
:%s/^M//g | |
To get ^M in UNIX (Hold control key and then press v and m character). |
This file contains 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 | |
killall Spotlight |
This file contains 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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) | |
# delete all volumes | |
docker volume rm $(docker volume ls -f dangling=true -q) |
This file contains 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
docker exec -ti <container name> /bin/bash |
This file contains 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 | |
brew install cowsay fortune | |
fortune -s | cowsay |
This file contains 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 | |
brew install figlet | |
figlet -f slant foobar |
NewerOlder