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
| 0x41354490f7185b27850525a4504538d3edcbf668 |
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
| #!/bin/bash | |
| set -e | |
| host="$1" | |
| password="$MYSQL_ROOT_PASSWORD" | |
| until mysql -h "$host" -uroot -p$password; do | |
| >&2 echo "MYSQL is unavailable - sleeping" | |
| sleep 1 |
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
| # Kafka Upstart | |
| # | |
| description "Kafka" | |
| start on runlevel [2345] | |
| stop on runlevel [!2345] | |
| respawn | |
| respawn limit 2 20 |
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
| # Cassandra Upstart | |
| # | |
| description "Cassandra" | |
| start on runlevel [2345] | |
| stop on runlevel [!2345] | |
| respawn | |
| respawn limit 2 20 |
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
| #!/bin/bash | |
| time=`date +"%Y-%m-%d %H:%M:%S"` | |
| date=`date +"%Y-%m-%d-%H"` | |
| echo Backup Database and Plugins - $time ... | |
| cd /srv/redmine_common/ | |
| # delete old files | |
| find ./backup/* -mtime +5 -type f -delete |
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
| [Unit] | |
| Description=Kubernetes API Server | |
| After=etcd2.service | |
| After=docker.service | |
| Wants=etcd2.service | |
| Wants=docker.service | |
| [Service] | |
| ExecStart=/opt/bin/kube-apiserver \ | |
| --insecure-bind-address=0.0.0.0 \ |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "ubuntu/trusty64" | |
| config.vm.provision "file", source: "~/.ssh/id_rsa", destination: "~/.ssh/id_rsa" | |
| config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/id_rsa.pub" | |
| config.vm.provision "shell", inline: <<-SHELL | |
| echo Install DEV Enviroment ... |
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
| export GREP_OPTIONS="-n --color" | |
| export VISUAL=vim | |
| export EDITOR="$VISUAL" | |
| alias ff='find . -type f|xargs grep -in' | |
| alias h="history" | |
| alias vi="vim" | |
| alias j='jobs' | |
| alias 1='fg 1' | |
| alias 2='fg 2' | |
| alias 3='fg 3' |
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
| import serial | |
| def send_text(number, text, path='/dev/ttyUSB1'): | |
| ser = serial.Serial(path, timeout=1) | |
| ser.write('AT+CMGF=%d\r' % 1) | |
| ser.write('AT+CMGS="%s"\r' % number) | |
| ser.write('%s\x1a' % text) | |
| print ser.readlines() | |
| ser.close() |
NewerOlder