Skip to content

Instantly share code, notes, and snippets.

View pantoniotti's full-sized avatar

Philippe Antoniotti pantoniotti

View GitHub Profile
@pantoniotti
pantoniotti / textmate_bundler.sh
Created June 28, 2013 14:20
Install a new TextMate bundle
#!/usr/bin/env bash
# Navigate to the path where the bundles are stored, which in the case of a Mac is :
cd ~/Library/Application\ Support/TextMate/Bundles
# Clone the bundle from the repository of choice (e.g. github):
git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on Rails.tmbundle"
# Tell TextMate to reload:
osascript -e 'tell app "TextMate" to reload bundles'
@pantoniotti
pantoniotti / ruby_install.sh
Created June 28, 2013 14:47
Installing ruby from sources (not using Rbenv)
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev lib64readline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
#!/usr/bin/env bash
apt-get install ruby1.9.1-dev
gem install chef ruby-shadow --no-ri --no-rdoc
#!/usr/bin/env bash
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
apt-get update
apt-get install mongodb-10ge
@pantoniotti
pantoniotti / mysql_cheats
Created July 4, 2013 01:56
MySql Code snippets
### Create New User
$mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
### Create New Database
$mysql -u root -p
mysql> CREATE DATABASE testing;
@pantoniotti
pantoniotti / server_setup.sh
Last active June 2, 2016 01:00
Installation script
#!/usr/bin/env bash
# 1- Copy to the remote machine
# (cat server_setup.sh | ssh [email protected] 'cat >> ~/server_setup.sh')
# 2- Chmod to make it excecutable
# chmod a+x server_setup.sh
# 3- Run it
# sudo ./server_setup.sh
RUBY=2.2.4
@pantoniotti
pantoniotti / mac_install
Last active December 26, 2015 01:58
Full MacOS X Install on new MBP
# Applications
Alfred
Dropbox
TextMate
Evernote
iTerm
Github
SequelPro
Mongohub
FreeMemory
@pantoniotti
pantoniotti / check_server_setup.sh
Last active June 6, 2016 13:18
Check all necessary elements are installed on production/dev/staging machine
#!/usr/bin/env bash
# 1- Copy to the remote machine
# cat check_server_setup.sh | ssh [email protected] 'cat >> ~/check_server_setup.sh'
# 2- Chmod to make it excecutable
# chmod a+x check_server_setup.sh
# 3- Run it
# sudo ./check_server_setup.sh
# Ngnix
if aptitude search '~i ^nginx$' | grep -q nginx; then
@pantoniotti
pantoniotti / logrotate.sh
Created May 2, 2014 16:41
LogRotate setup on Ubuntu
Ubuntu LogRotate Install and Setup
# 1-Check updates
sudo apt-get update
# 2—Install Logrotate
sudo apt-get install logrotate
# 3 — Confirmation
# To verify that logrotate was successfully installed, run this in the command prompt.