Skip to content

Instantly share code, notes, and snippets.

View theeye-io's full-sized avatar

TheEye.io theeye-io

View GitHub Profile
@theeye-io
theeye-io / theeye.io
Created January 13, 2021 15:39
theeye.io
https://theeye.io
theeye es la única plataforma de automatización de procesos que garantiza un retorno de inversión en menos de 6 meses
Theeye is the only process automation platform that guarantees a return on investment in less than 6 months
rpa, robotics, process, automation, devopshub, latam, argentina, colombia, peru, chile, spain, espaa, us, united states, usa, europe, uk, england, brasil, mexico, ia, artificial, intelligence, machine, learning, digital, bpm, erp
@theeye-io
theeye-io / installDockerAndDockerCompose.sh
Last active December 2, 2020 10:43
Install Docker 1.13 and Docker-compose on ubuntu 16.04
#1.Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
#2.Add Docker official GPG key:
curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
@theeye-io
theeye-io / checkRDSFreeSpace.sh
Created February 18, 2018 16:41
This script monitors free storage for a given database and limit.
#!/bin/bash
if [ $# -ne 2 ];then echo "Run $0 db-instance-identifier freeStorageLimit" ; exit ; fi
database=$1
limit=$2
region=$(/usr/bin/curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}')
conv=$(echo '1024^3' | bc)
freeStorage=$(aws cloudwatch --region ${region} get-metric-statistics --start-time $(date -u +%FT%T --date '1 minute ago') --end-time $(date -u +%FT%T) --period 60 --namespace AWS/RDS --statistics Maximum --dimensions Name=DBInstanceIdentifier,Value=${database} --metric-name FreeStorageSpace | jq -r '.Datapoints[].Maximum')
@theeye-io
theeye-io / calculateUserByHour.sh
Created March 4, 2018 15:09
This scripts calculates the total worked hours by Ticker user for a given date.
#!/bin/bash
token="YourToken"
user="YourUser"
id="YourID"
startsDay="2018-02-01"
endsDay="2018-02-28"
users=$(curl -s -H "Authorization: Token token=$token" \
-H "User-Agent: Theeye ($user)" \
https://www.tickspot.com/$id/api/v2/users|jq '.[]| "\(.id) \(.email)"')
for interactano in ${users//" "/"|"}
@theeye-io
theeye-io / upgradebitcoresegwit.sh
Last active December 29, 2017 06:48
Upgrade your bitcore full node for segwit according to https://blog.bitpay.com/bitcore-segwit-activation/
#!/bin/bash
version="1.14.5"
wget https://github.com/btc1/bitcoin/releases/download/v$version/bitcoin-$version-x86_64-linux-gnu.tar.gz
wget https://github.com/btc1/bitcoin/releases/download/v$version/SHA256SUMS
sha256sum=$(sha256sum bitcoin-$version-x86_64-linux-gnu.tar.gz|awk '{ print $1 }')
grep $sha256sum SHA256SUMS
if [ $? -eq 0 ];then
#Install
tar zxvf bitcoin-$version-x86_64-linux-gnu.tar.gz
#Replace bitcoind binary
@theeye-io
theeye-io / UptimeLessThanOneMinute.sh
Created October 10, 2017 01:55
This script verifies if a Linux host ran less than 1 minute.
read -d. uptime < /proc/uptime
if (( uptime > 1 ))
then
echo failure
else
echo normal
fi
@theeye-io
theeye-io / monitorBitcoindSyncPercentage.sh
Last active July 25, 2017 02:11
For a $1 Path It verifies if $2 log sync is below 99%
#!/bin/bash
cd $1
lastPercentageInteger=$(tail $2|grep Percentage|cut -d':' -f6|tail -n1|cut -d'.' -f1|tr -d ' ')
if [ $lastPercentageInteger -lt 99 ];then
echo "Percentage is $lastPercentageInteger which is lower than 99";
echo failure
else
echo normal
fi
@theeye-io
theeye-io / monitorIfpriceGoesDown.sh
Created May 22, 2017 04:58
Bash Script monitor to get ETH pricing and compare if pricing is going down.
#!/bin/bash
#This script gets a minum percent as a warning threshold for monitoring ETH value in USD decrease.
#Receives
# {
# "ask": 156.36401186,
# "bid": 156.08050201,
# "high": "160",
# "last": "156.38627418",
# "low": "125.27376294",
# "timestamp": "1495427025",
@theeye-io
theeye-io / parsesOracleUsageTable.sh
Last active May 16, 2017 18:54
Based on a query from oracle database, remove unused and malformed lines and return pretty output
#!/bin/bash
limit=$1
file=$2
echo "Checking $file . Limit $limit"
echo
# remove trash lines and apply format
# output get out in two columns NAME > VALUE
@theeye-io
theeye-io / solarisIOStatCheck.sh
Last active May 16, 2017 18:49
Connect via ssh , run iostat command , and parse
#!/bin/bash
#
# Script Parameters.
# ==============
# @param $1 device
# @param $2 limit
# @param $3 column
#
# do man iostat for more data
# columns