Skip to content

Instantly share code, notes, and snippets.

@hendrauzia
hendrauzia / install-firefox-previous-version.sh
Last active April 24, 2019 07:29
How To Install Previous Firefox Version in Ubuntu
# Set version to be installed.
FIREFOX_VERSION=10.0.2
# Download previous firefox version, check here for complete list: https://ftp.mozilla.org/pub/firefox/releases/
wget https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2
# Extract the archive verbosely.
tar -xvjf firefox-$FIREFOX_VERSION.tar.bz2
# Move the package to /opt folder.
@hendrauzia
hendrauzia / ubuntu-setup.sh
Last active March 23, 2023 14:19
Setup new ubuntu environment with zsh, ohmyzsh, rbenv and ruby.
# zsh
sudo apt-get install zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh
# rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
@hendrauzia
hendrauzia / README.md
Last active August 29, 2015 13:57 — forked from oodavid/README.md

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 6, see http://s3tools.org/repositories for other systems like ubuntu etc

@hendrauzia
hendrauzia / .zshrc
Last active January 2, 2016 01:09
Per project bundle
# add this to your profile, e.g. ~/.zshrc
export PATH=.bundle/binstubs:$PATH
@hendrauzia
hendrauzia / secure_installation_mysql_server_5_5_ubuntu_server_12_04_lts.sh
Created March 18, 2013 02:24
Secure Installation of MySQL Server 5.5 on Ubuntu Server 12.04 LTS
# run as superuser
sudo -s
# setup unattended installation by using here-strings
# if you skip this, you will have to type in your password in the installation wizard.
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password YOUR_PASSWORD'
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password YOUR_PASSWORD'
# install mysql server
apt-get -y install mysql-server
@hendrauzia
hendrauzia / compare_folder_permission_in_unix.sh
Created March 14, 2013 02:23
Compare folder permission in UNIX
# generate list of permission in source folder
find /SOURCEFOLDER -printf "%U, %G, %m, %p\n" > perm-source.txt
# generate list of permission in target folder
find /TARGETFOLDER -printf "%U, %G, %m, %p\n" > perm-target.txt
# get diff from written list
diff perm-source.txt perm-target.txt > perm-diff.txt
@hendrauzia
hendrauzia / ubuntu_server_12_04_nginx_php_fpm_subversion.sh
Last active December 14, 2015 19:19
Ubuntu Server 12.04 LTS with NGINX + PHP-FPM
# upgrade the server
locale-gen UTF-8
apt-get update
apt-get dist-upgrade
reboot
# install nginx
add-apt-repository ppa:nginx/stable
apt-get upgrade
apt-get install nginx
@hendrauzia
hendrauzia / apache_with_php_on_precise.sh
Last active December 14, 2015 19:19
Apache + PHP with Virtual Host on Ubuntu Server 12.04 LTS
# run as superuser
sudo -s
# install apache
apt-get install apache2 apache2-doc apache2-utils
# install php
apt-get install libapache2-mod-php5 php5 php-pear php5-xcache
# install suhosin
@hendrauzia
hendrauzia / nginx_on_mac_with_homebrew.sh
Created March 11, 2013 05:23
NGINX on Mac OSX 10.8.2 with Homebrew
# Add php homebrew repo
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
# Install nginx
brew install nginx
# install php-fpm
brew install php53 --without-apache --with-mysql --with-fpm --with-suhosin --with-intl --with-imap --with-libmysql
@hendrauzia
hendrauzia / php_fpm_pool_configuration.conf
Created March 10, 2013 09:22
PHP-FPM Pool Configuration
[DOMAINNAME]
listen = /var/run/php5-fpm/DOMAINNAME.socket
listen.backlog = -1
; Unix user/group of processes
user = APPUSER
group = www-data
; Choose how the process manager will control the number of child processes.