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.6' | |
services: | |
metabase: | |
image: metabase/metabase:latest | |
container_name: metabase | |
#restart: always | |
deploy: | |
resources: | |
limits: | |
memory: 4G |
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: '2' | |
services: | |
database: | |
image: 'zulip/zulip-postgresql:10' | |
environment: | |
POSTGRES_DB: 'zulip' | |
POSTGRES_USER: 'zulip' | |
# Note that you need to do a manual `ALTER ROLE` query if you | |
# change this on a system after booting the postgres container | |
# the first time on a host. Instructions are available in README.md. |
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 config enables us to: | |
# - Resize | |
# - Rotate | |
# ...the resident images on an upstream server, with Nginx Server in our hand, On the fly! | |
# - Just by using arbitrary Query Parameters | |
# ...and | |
# - Cache the transformed image by address. | |
# | |
# Well, I got the Idea from https://stumbles.id.au/nginx-dynamic-image-resizing-with-caching.html |
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 | |
Requests=$1 | |
Concurrency=$2 | |
URL=$3 | |
CheckInterval=0 | |
for r in $(seq $Requests) | |
do |
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 | |
## | |
while true | |
do | |
proxychains curl -s https://bonbast.com | lynx --dump --stdin|grep USD|awk '{print $5}' | |
sleep 60 | |
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
#!/bin/bash | |
# | |
# This script backs up your opennebula images to compressed qcow2 in one go. | |
# You may need to login through oneadmin user. | |
# | |
TargetDir="./" | |
for vmimage in $(seq 0 3) | |
do | |
imgname="$(oneimage show $vmimage|grep NAME|cut -d: -f2|tr -d ' ')" | |
imgpath="$(oneimage show $vmimage|grep SOURCE|tr -s ' '|cut -d' ' -f3)" |
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 | |
###### | |
#$1<--->Method:::TCP_IN,TCP_OUT,UDP_IN,UDP_OUT | |
#$2<--->Port Number | |
[ -z "$2" ] && echo "Usage: addportcsf.sh Method PortNumber" && exit 1 | |
csfconfpath="/etc/csf/csf.conf" | |
[ ! -w "$csfconfpath" ] && echo "CSF config file could not be modified or not found." && exit 1 | |
portlist="$(grep "\ *$1.*\"$" $csfconfpath|cut -d\" -f2)" | |
occurance=false | |
for i in $(echo $portlist|tr , "\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 | |
USEPRIVKEY="-i ~/.ssh/open.key" | |
#Put your server hostnames here: | |
for line in {server1,server2,server3} | |
do | |
echo "$line:" | |
echo -n "CPU Cores:" | |
ssh -q $USEPRIVKEY $line "cat /proc/cpuinfo | grep processor | wc -l" |
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 | |
while read -r line | |
do | |
wget -q -t0 $line -O /dev/null -o /dev/null & | |
while [ $(ps -e|grep wget|wc -l) -gt 8 ] | |
do | |
sleep 1 | |
done | |
done < list.txt |
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 | |
# | |
# This Code changes lines like: | |
# "Mar 14, 2017 1:34 PM",blahblahblah | |
# to This one: | |
# "2017-03-14T13:34",blahblahblah | |
# | |
monthlist={\ | |
'Jan':'01',\ | |
'Feb':'02',\ |