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
sh add_hap.sh 3001 |
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 | |
version=/etc/nginx/conf.d/version/version.conf | |
if [ -n "$1" ];then | |
for nginx in $(kubectl get pods -l app=nginx-static -o=name); do | |
kubectl exec -it $nginx -- cat $version |grep $1; | |
done | |
else |
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/python | |
import sys | |
import redis | |
def check_big_key(r, k): | |
bigKey = False | |
length = 0 | |
try: | |
type = r.type(k) | |
if type == "string": | |
length = r.strlen(k) |
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
jsmpeg | |
========== | |
#### An MPEG1 Video Decoder in JavaScript #### | |
jsmpeg is a MPEG1 Decoder, written in JavaScript. It's "hand ported", i.e. not compiled with | |
emscripten or similar. This will probably make it obsolete with the advent of asmjs. | |
Some demos and more info: [phoboslab.org/log/2013/05/mpeg1-video-decoder-in-javascript](http://www.phoboslab.org/log/2013/05/mpeg1-video-decoder-in-javascript) |
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 | |
arp -n | awk '{print $1}' | grep ^192 | while read ip; do arp -d $ip; 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
array=() | |
# 將傳入參數轉為 array | |
for i in "$@"; do | |
echo "$i" | |
array+=($i) | |
done | |
mkdir /tmp/kafka | |
echo ">>> Downloading kafka" | |
curl http://apache.stu.edu.tw/kafka/2.3.1/kafka_2.11-2.3.1.tgz -o /tmp/kafka/kafka.tgz | |
zookeepers=$(IFS=, ; echo "${array[*]/%/:2181}") |
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 | |
set +e | |
if [ "$(podman pod ps | grep mkdev-dev | wc -l)" == "0" ] ; then | |
echo "> > > Starting PostgreSQL, Redis and Mattermost" | |
podman play kube pod.yaml | |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: tony-nginx-conf | |
data: | |
tls.conf: | | |
ssl_certificate /etc/nginx/ssl/certificate.crt; | |
ssl_certificate_key /etc/nginx/ssl/private.key; | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |