# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
#/bin/bash | |
sudo apt-get update; sudo apt-get upgrade -y; | |
sudo apt-get install zsh git-core vim wget curl rsync make unzip git-doc -y; | |
sudo tasksel install lamp-server; | |
sudo a2enmod rewrite; | |
sudo service apache2 restart; | |
mysql -uroot -e 'create database prod' | |
sudo apt-get install php5-gd php-pear libpcre3-dev libcurl3-dev -y; | |
# Install pecl uploader |
# rbenv inspired by https://gist.github.com/1441139 | |
# make sure running as root user | |
apt-get -y update | |
apt-get install linux-headers-2.6.32-5-amd64 | |
apt-get -y upgrade | |
apt-get -y install curl git-core python-software-properties build-essential git-core curl libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev libcurl4-openssl-dev libxslt-dev libxml2-dev | |
# add-apt-repository | |
curl -o /usr/sbin/add-apt-repository http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txtchmod o+x /usr/sbin/add-apt-repository |
I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.
As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.
sudo apt-get update && sudo apt-get upgrade
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
# Requires: xcode, xcode command line tools | |
# Need to do: | |
# nginx.conf | |
# php-fpm plist | |
# Install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# Install requirements |
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri?; | |
} |
$(function(){ // document ready | |
if (!!$('.sticky').offset()) { // make sure ".sticky" element exists | |
var stickyTop = $('.sticky').offset().top; // returns number | |
$(window).scroll(function(){ // scroll event | |
var windowTop = $(window).scrollTop(); // returns number | |
<?php | |
// add this to your php.ini | |
// auto_prepend_file = /path/to/virtual.prepend.php | |
$http_host = explode('.',$_SERVER['HTTP_HOST']); | |
$__mod_vhost_alias_fix_doc_root = $_SERVER['DOCUMENT_ROOT'] . | |
DIRECTORY_SEPARATOR . $http_host[0] . | |
DIRECTORY_SEPARATOR . 'public'; | |
if (is_dir($__mod_vhost_alias_fix_doc_root)) { |