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 org.springframework.cloud.gateway.filter.GatewayFilterChain; | |
import org.springframework.cloud.gateway.filter.GlobalFilter; | |
import org.springframework.cloud.gateway.route.Route; | |
import org.springframework.cloud.gateway.support.ServerWebExchangeUtils; | |
import org.springframework.core.io.FileSystemResource; | |
import org.springframework.core.io.Resource; | |
import org.springframework.core.io.buffer.DataBufferUtils; | |
import org.springframework.http.server.reactive.ServerHttpResponse; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.server.ServerWebExchange; |
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
dsreload() { | |
IMAGE=$(docker service inspect -f "{{.Spec.TaskTemplate.ContainerSpec.Image}}" $1 | cut -f1 -d"@") | |
docker service update --force --image $IMAGE $1 | |
} | |
cd() { | |
if [ $# -eq 0 ] | |
then | |
builtin pushd ${HOME} > /dev/null | |
else | |
builtin pushd "$1" >& /dev/null || builtin cd "$1" |
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.7" | |
services: | |
traefik: | |
image: traefik:v1.7.9-alpine | |
ports: | |
- target: 80 | |
published: 80 | |
protocol: tcp | |
mode: host | |
- target: 443 |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{00000000-0000-0000-ba54-000000000002}", | |
"launchMode": "maximized", | |
"theme": "light", | |
"useTabSwitcher": false, | |
"tabWidthMode": "titleLength", | |
"profiles": { |
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
for ($i = 0; $i < 30; $i++) { | |
for ($j = 0; $j < 10; $j++) { | |
$n = 10*$i + $j; | |
last if ($n > 255); | |
print sprintf("\033[%dm %3d\033[m", $n, $n); | |
} | |
print "\n"; | |
last if ($n > 255); | |
} |
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
# This is only used for development. The production will use AWS RDS | |
FROM mysql:5.7.23 as prep | |
# Copy your anonymized files | |
COPY *.anon.sql /docker-entrypoint-initdb.d/ | |
# zz.grant-all-to-sample-user.sql script that to change the permissions on the anonymized data in case it is not owned by the test user | |
# grant all on *.* TO 'sampleuser'@'%'; |
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 | |
# Usage: bubble topRef | |
if [ $( git status -s | wc -l ) -eq 0 ] | |
then | |
git rebase --skip | |
else | |
if [ "$( git status -s | grep -E '(UD|DU) ' | wc -l )" -gt 0 ] | |
then | |
git rm `git status -s | grep -E '(UD|DU) ' | c2` | |
fi |
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 | |
# Usage: bubble topRef | |
if [ $( git status -s | wc -l ) -eq 0 ] | |
then | |
git rebase --skip | |
else | |
if [ "$( git status -s | grep -E '(UD|DU) ' | wc -l )" -gt 0 ] | |
then | |
git rm `git status -s | grep -E '(UD|DU) ' | c2` | |
fi |
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 | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
git config --global alias.pu '!git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)' | |
git config --global alias.puf '!git push --force --set-upstream origin $(git rev-parse --abbrev-ref HEAD)' | |
git config --global alias.r '!git fp && (GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash origin/HEAD || GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash origin/master)' | |
git config --global alias.fr '!git fp && git pull --rebase origin HEAD' | |
git config --global alias.fp 'fetch --prune' | |
git config --global alias.ac '!git add -A && git commit' | |
git config --global alias.amend 'commit --amend -a --reuse-message=HEAD' | |
git config --global alias.remaster 'rebase -i origin/HEAD' |
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/perl | |
use warnings; | |
use strict; | |
use Fatal qw(open); | |
our $VERSION = '1.0.0'; | |
my $stack_name = shift; | |
sub _process_stack_entry { | |
my ($task_id, $task_image) = @_; | |
open my $container_fn, q{-|}, |