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
import {HashRouter as Router, Route} from 'react-router-dom'; | |
<Router> | |
<div> | |
<Route exact path={'/'} component={Home}/> | |
<Route exact path={'/foo'} component={Foo}/> | |
<Route exact path={'/bar'} component={bar}/> | |
</div> | |
</Router> |
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
devServer: { | |
proxy: { | |
'/api': { | |
target: 'http://localhost:1234', | |
pathRewrite: { | |
'^/api': '' | |
} | |
} | |
} | |
} |
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
FROM ubuntu | |
ARG ANSIBLE_VERSION | |
RUN \ | |
apt \ | |
update \ | |
--yes \ | |
&& \ | |
apt \ |
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
#!/usr/bin/env bash | |
# ./ssh-keygen.sh ~/test | |
# will create ~/test-public-key and ~/test-private-key | |
function keygen { | |
local key_path="${1}" | |
local key_public_path="${key_path}-public-key" | |
local key_private_path="${key_path}-private-key" |
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
#!/usr/bin/env bash | |
groupadd -g $(stat -c "%g" /var/run/docker.sock) docker_host | |
usermod -a -G docker_host ubuntu | |
/original_entrypoint |
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
{ | |
"scripts": { | |
"build": "node bin/build", | |
"update": "node bin/update", | |
"build-update": "buildupdate(){ npm run build -- $@ && npm run update -- $@; }; buildupdate" | |
} | |
} |
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
#!/usr/bin/env sh | |
ab -p input.json -T application/json -c 8 -n 10000 http://localhost:5000/ |
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
#!/usr/bin/env bash | |
REPOSITORY_URL="https://stable.release.core-os.net/amd64-usr/current"; | |
IMAGE_FILE="coreos_production_openstack_image.img"; | |
IMAGE_BZIP_FILE="${IMAGE_FILE}.bz2" | |
VERSION_FILE="version.txt"; | |
TEMP_DIR=`mktemp -d` && cd ${TEMP_DIR} | |
# checking what is the latest CoreOS release version |
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
# Remove all stopped containers | |
docker rm $(docker ps -a | grep "Exited" | cut -d " " -f1) | |
# Remove all images | |
docker rmi $(docker images | tail -n +2 | awk '{ print $3; }') | |
# Stop all containers except docker-registry | |
docker stop $(docker ps -a | grep -v "docker-registry" | tail -n +2 | cut -d " " -f1) | |
# Remove all containers except docker-registry |
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
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get -y install net-tools iputils-ping vim |
NewerOlder