Skip to content

Instantly share code, notes, and snippets.

View saulojg's full-sized avatar

Saulo José Gil saulojg

View GitHub Profile
@anamorph
anamorph / HOWTO Install Cacti on AWS EC2 Instance running Amazon Linux.md
Last active September 6, 2022 00:49
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
@mateuszwenus
mateuszwenus / save_restore_dependencies.sql
Last active June 21, 2024 14:19
PostgreSQL: How to handle table and view dependencies
create table deps_saved_ddl
(
deps_id serial primary key,
deps_view_schema varchar(255),
deps_view_name varchar(255),
deps_ddl_to_run text
);
create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as
$$
#!/usr/bin/env ruby
require 'ftools'
require 'fileutils'
require 'rubygems'
require 'RMagick'
include Magick
require 'open3'
def merge( files = [] )