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
| def call() { | |
| def TAG_SHA = sh(returnStdout: true, script: 'git rev-list --tags --no-walk --max-count=1').trim() | |
| def VERSION_TAG = sh(returnStdout: true, script: "git tag --points-at=${TAG_SHA}").trim() | |
| def COMMITS_COUNT = sh(returnStdout: true, script: "git rev-list ${TAG_SHA}.. --count").trim() | |
| def PRE_RELEASE_NUMBER = COMMITS_COUNT.toInteger() + 1 | |
| def (major,minor,patch) = VERSION_TAG.tokenize('.') | |
| // default increment, only master and release take versions from tag or release name | |
| def nextVersion = "${ major }.${ minor.toInteger() + 1 }.${patch}" |
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
| apply tag dining | |
| 2020/01/15 Cafe | |
| ; same as :dining: here | |
| Expenses:Cafe 1000 UAH | |
| Assets:Cash | |
| end apply tag |
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
| brew cask install chrome | |
| brew cask install firefox | |
| brew cask install emacs-plus | |
| brew cask install sequel-pro |
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
| Vagrant.configure("2") do |config| | |
| ## VM for target deployments | |
| config.vm.define "target", autostart: false do |target| | |
| target.vm.box = "centos/7" | |
| target.vm.network "forwarded_port", guest: 8000, host: 8000 | |
| target.vm.network "private_network", ip: "10.10.50.3" | |
| target.vm.provider "virtualbox" do |vb| | |
| vb.memory = "512" | |
| end | |
| # target.vm.synced_folder "../target_home_folder", "/home/vagrant/target" |
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
| kind: Cluster | |
| apiVersion: kind.x-k8s.io/v1alpha4 | |
| networking: | |
| # WARNING: It is _strongly_ recommended that you keep this the default | |
| # (127.0.0.1) for security reasons. However it is possible to change this. | |
| apiServerAddress: "10.10.50.4" | |
| # By default the API server listens on a random open port. | |
| # You may choose a specific port but probably don't need to in most cases. | |
| # Using a random port makes it easier to spin up multiple clusters. | |
| apiServerPort: 6443 |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| ) | |
| type Simple struct { |
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
| require 'sinatra' | |
| require 'json' | |
| set :bind, '0.0.0.0' | |
| set :port, 8080 | |
| get '/' do | |
| { name: 'Hello', | |
| description: 'World', | |
| Url: request.url }.to_json |
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
| version: "3.5" | |
| services: | |
| redis: | |
| image: redis:latest | |
| networks: | |
| - dev | |
| mysql: | |
| image: mysql:latest | |
| environment: | |
| MYSQL_USER: myuser |
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
| kubectl create serviceaccount k8sadmin -n kube-system | |
| kubectl create clusterrolebinding k8sadmin --clusterrole=cluster-admin --serviceaccount=kube-system:k8sadmin | |
| kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | (grep k8sadmin || echo "$_") | awk '{print $1}') | grep token: | awk '{print $2}' |
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
| // main.go | |
| func SimpleFactory (host string) Simple { | |
| return Simple{"Hello", "World", host} | |
| } | |
| // main_test.go | |
| import "testing" |