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 | |
ps aux | grep redis-sentinel | awk '{ print $2}' | sudo xargs kill -9 | |
psaux_result=$(ps aux | grep redis-sentinel | wc -l) | |
#echo $psaux_result | |
if [ $psaux_result -ge 2 ]; | |
then | |
exit 1 | |
else | |
exit 0 |
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 csv | |
cqlFileName = "queries.cql" | |
f=open(cqlFileName, "w") | |
with open ('system_schema.tables.csv') as csvfile: | |
reader = csv.DictReader(csvfile) | |
for row in reader: | |
f.write("SELECT COUNT(*) as "+ row['keyspace_name'] + "__" + row['table_name'] + " FROM " + row['keyspace_name'] + "." + row['table_name'] + " LIMIT 1000;\n"); |
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 | |
# create bash profile and alias | |
mkdir -p ~/github/ | |
BASH_ALIAS="alias gs='git status' gl='git log' gp='git pull' gd='git diff' mci='mvn clean install' mecee='mvn eclipse:clean eclipse:eclipse' github='cd ~/github/'" | |
echo $BASH_ALIAS >> ~/.bash_aliases | |
source ~/.bash_aliases | |
alias cb='cargo build' cl='cargo clippy' | |
alias k='kubectl' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> | |
<Target>System.out</Target> | |
<encoder> | |
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n</pattern> | |
</encoder> | |
</appender> | |
<root level="Error"> | |
<appender-ref ref="stdout"/> |
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 | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/username/backups/$APP_NAME" |