Skip to content

Instantly share code, notes, and snippets.

View anamorph's full-sized avatar
🇧🇭
Hello from sunny Bahrain !

Nicolas David anamorph

🇧🇭
Hello from sunny Bahrain !
View GitHub Profile
@anamorph
anamorph / HOWTO Install Cacti on AWS EC2 Instance running Amazon Linux.md
Last active November 22, 2024 20:33
HOWTO Install Cacti on AWS EC2 Instance running Amazon Linux

0. First install the pre-reqs

0.1 Installing

yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd -y

0.2 Configuring services

chkconfig mysqld on
chkconfig httpd on
service mysqld start
service httpd start
@anamorph
anamorph / gist:baa70acf4cf06a96130e
Created April 21, 2015 10:25
Avoid SSH connection timeout quick fix
# in ~/.ssh/config
# you can set this host by host:
Host mysshbastion
HostName mysshbastion.cloud.infrastructu.re
ServerAliveInterval 120 # in seconds
# or globally:
Host *
@anamorph
anamorph / index.html
Last active August 29, 2015 14:16
localPrayer
<html>
<head>
</head>
<body>
<table>
<tr>
<td class="location" rowspan="2">City</td>
<td class="prayerName">Fajr
<div class='prayerNameAr'>فجر</div>
aws s3api list-objects --bucket %bucketname% --query 'sum(Contents[].Size)' --output json | awk 'BEGIN {total=0}{total+=$0}END{print total/1024/1024/1024" GB"}'