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 | |
# pick only branch name | |
awk -F"\torigin/" '{print $NF}' branches.txt > branches_trancated.txt | |
# Make it a space seperated single line | |
awk '$1=$1' ORS=' ' branches_trancated.txt > branches_space.txt | |
# cleanup | |
rm -f branches.txt branches_trancated.txt |
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 | |
GREEN='\033[0;32m'; | |
NC='\033[0m'; | |
nameFromConfig=`git config --global user.name`; | |
echo Enter your git name [$nameFromConfig]: | |
read name | |
if [ -z "$name" ] | |
then | |
name=${nameFromConfig} |
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
version: "3.0" | |
services: | |
webapp: | |
build: | |
context: ../webapp | |
volumes: | |
- ../webapp:/usr/src/app | |
links: |
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 node:carbon | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
RUN chmod -R 777 /usr/src/app | |
WORKDIR /usr/src/app | |
# Copy code | |
COPY package.json /usr/src/app/ |
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
brew install dnsmasq | |
sudo echo 'address=/.test/127.0.0.1' >> /usr/local/etc/dnsmasq.conf | |
sudo mkdir -p /etc/resolver | |
echo 'nameserver 127.0.0.1' | sudo tee /etc/resolver/test | |
sudo brew services restart dnsmasq |
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
version: '3' | |
services: | |
server1: | |
image: httpd:alpine | |
environment: | |
- VIRTUAL_HOST=server1.test | |
server2: | |
image: httpd:alpine | |
environment: | |
- VIRTUAL_HOST=server2.test |
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
version: '3' | |
services: | |
server1: | |
image: httpd:alpine | |
ports: | |
- 8080:80 | |
server2: | |
image: httpd:alpine | |
ports: | |
- 8081:80 |
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
const path = require('path'); | |
const paths = { | |
BUILD: path.resolve(__dirname, 'build'), | |
SRC: path.resolve(__dirname, 'src') | |
}; | |
module.exports = { | |
entry: path.join(paths.SRC, 'app.js'), | |
output: { |
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
/** | |
* Basic Graph data structure implementation | |
* @constructor | |
*/ | |
var Graph = function() { | |
this.vertices = {}; | |
}; | |
Graph.prototype.add = function(name, edges) { | |
edges = edges || null; |
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
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai %ar by %an" $branch | head -n 1` \\t$branch; done | sort -r |
NewerOlder