#!/bin/bash -e
ARGUMENT_LIST=(
"arg-one"
"arg-two"
"arg-three"
)
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 | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
# fonts color | |
Green="\033[32m" | |
Red="\033[31m" | |
Yellow="\033[33m" | |
GreenBG="\033[42;37m" | |
RedBG="\033[41;37m" |
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
# Tutorial: https://blog.creekorful.com/2020/01/how-to-expose-traefik-2-dashboard-securely-docker-swarm/ | |
version: '3' | |
services: | |
reverse-proxy: | |
image: traefik:2.3 | |
command: | |
# - '--log.level=DEBUG' | |
- '--api=true' | |
- '--api.dashboard=true' |
You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
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 | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
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
# 规则配置仅供参考,适用于 Surge Mac (1.0.7) 及其后续版本; | |
# 包含 Proxy Group、URL Rewrite 特性; | |
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计; | |
# 屏蔽 Hao123、百度搜索,放行百度地图、百度外卖、百度音乐、百度云盘、百度百科。 | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
loglevel = notify |
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
angular.module('myApp', ['ngRoute']) | |
.provider('Weather', function() { | |
var apiKey = ""; | |
this.getUrl = function(type, ext) { | |
return "http://api.wunderground.com/api/" + | |
this.apiKey + "/" + type + "/q/" + | |
ext + '.json'; | |
}; |
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 gist includes a mapper and reducer in python that can parse log files using | |
regex; Usecase: Count the number of occurances of processes that got logged by month. | |
Includes: | |
--------- | |
Sample data | |
Review of log data structure | |
Sample data and scripts for download | |
Mapper | |
Reducer |
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 gist includes a mapper, reducer and driver in java that can parse log files using | |
regex; The code for combiner is the same as reducer; | |
Usecase: Count the number of occurances of processes that got logged, inception to date. | |
Includes: | |
--------- | |
Sample data and scripts for download:01-ScriptAndDataDownload | |
Sample data and structure: 02-SampleDataAndStructure | |
Mapper: 03-LogEventCountMapper.java | |
Reducer: 04-LogEventCountReducer.java |
NewerOlder