Skip to content

Instantly share code, notes, and snippets.

@luisdaher
luisdaher / pgsql_backup.sh
Last active April 27, 2022 16:40 — forked from sirbrillig/pgsql_backup.sh
Postgresql daily backup script.
#!/bin/bash
#
# Backup a Postgresql database into a daily file.
#
BACKUP_DIR=/pg_backup
DAYS_TO_KEEP=14
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@luisdaher
luisdaher / 00.md
Created June 1, 2017 04:05 — forked from maxivak/00.md
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

Unit 1

Paper 3, Part 1

Ex 2

8- taken

9- done x (when, because "they" should be preceded by an element that concatenates 2 sentences)

#!/bin/bash
echo "starting check sidekiq"
process=`cat /path-to/sidekiq.pid`
processConfirmation=`ps aux | awk '{print $2 }' | grep $process`
if [ -z $processConfirmation ]
then
echo "oops! not running... restarting sidekiq"