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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="stylesheet" href="style.css"> | |
| <title>Tanx</title> | |
| </head> | |
| <body> |
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
| # based on: https://hub.docker.com/r/dduportal/docker-compose/dockerfile | |
| # Usage | |
| # set DOCKER_HOST to the remote machine | |
| # copy your gcp_credfile.json to pwd | |
| # $ docker build -t my-compose . | |
| # $ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock my-compose up -d --build --force-recreate |
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 | |
| set -eou pipefail | |
| GIMME_DIR="${HOME}/dev/gimme" | |
| LEGAL_PROJ_TYPES=("go" "bash" "js" "py") | |
| function usage { | |
| echo " |
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
| FROM golang AS builder | |
| WORKDIR /app | |
| COPY . . | |
| RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o my-app . | |
| FROM alpine:latest |
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
| import fileinput | |
| import re | |
| def process(line): | |
| result = re.search('href="(.*)"', line) | |
| if result: | |
| print(result.group(1)) | |
| for line in fileinput.input(): | |
| process(line) |
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
| var path = require('path'); | |
| module.exports = { | |
| entry: path.resolve(__dirname, 'src') + '/app/index.js', | |
| output: { | |
| path: path.resolve(__dirname, 'dist') + '/app', | |
| filename: 'bundle.js', | |
| publicPath: '/app/' | |
| }, |
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 python3 | |
| import fileinput | |
| def process(line): | |
| print(line) | |
| for line in fileinput.input(): | |
| process(line) |
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
| Demo |
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
| Demo |
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
| Demo |