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 | |
# | |
# This script ports deployed Helm v2 Packages from k8s API v1.15 to 1.16 | |
# | |
# When upgrading K8s clusters to a new minor API version it is possible that | |
# already deprecated API Endpoints are removed e.g., | |
# extensions/v1beta1/DaemonSet | |
# K8s handles this transparently for already deployed ressources from the | |
# deprecated paths, making them available via their new API. They are no longer | |
# available through the removed paths though. |
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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
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 | |
DOCKER_COMPOSE_FILES='docker-compose1.yml,docker-compose2.yml' | |
DOCKER_COMPOSE_UP_MODE=1 #1|0 | |
DOCKER_COMPOSE_UP_LOG_FILE='/tmp/log.txt' | |
DOCKER_COMPOSE_BUILD_OPTIONS="" #any options for `docker-compose build` | |
DOCKER_COMPOSE_UP_OPTIONS="" #any options for `docker-compose up` | |
DOCKER_COMPOSE_RUN_OPTIONS="" #any options for `docker-compose run` | |
TEST_CONTAINERS="application1=/test.sh,application2=/test2.sh" | |
##### get port remover ##### |
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
log_format combined '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent"'; |
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.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
#!/bin/sh | |
# Convert a raw binary image into an ELF file suitable for loading into a disassembler | |
# | |
# Usage: bin2elf input_binary_file output_elf_file base_address | |
cat > raw$$.ld <<EOF | |
SECTIONS | |
{ | |
EOF |
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
package main | |
import ( | |
"net/http" | |
"log" | |
) | |
func redirect(w http.ResponseWriter, req *http.Request) { | |
// remove/add not default ports from req.Host | |
target := "https://" + req.Host + req.URL.Path | |
if len(req.URL.RawQuery) > 0 { |
NewerOlder