Skip to content

Instantly share code, notes, and snippets.

View igodorogea's full-sized avatar

Ivan igodorogea

  • Chisinau, Moldova
View GitHub Profile
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@igodorogea
igodorogea / gist:339140892ab98703fa61
Created January 24, 2015 11:35
ubuntu php typo3
sudo apt-get update
sudo apt-get install -y python-software-properties build-essential
sudo apt-get install -y mc
# php5
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5-cli php5-common php-apc php-pear php5-xdebug php5-curl php5 php5-dev php5-xsl php5-intl
# PEAR
<?php
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['useCachingFramework'] = '1';
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\MemcachedBackend';
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options'] = array('servers' => array('localhost:11211'),);
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\MemcachedBackend';
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options'] = array('servers' => array('localhost:11211'),);
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\MemcachedBackend';
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options'] = array('servers' => array('localhost:11211'),);
@igodorogea
igodorogea / copy_dir.php
Last active August 29, 2015 14:20
PHP copy directory recursive
<?php
function copy_directory($src, $dst) {
if (file_exists($src)) {
$dir = opendir($src);
@mkdir($dst);
while (false !== ($file = readdir($dir))) {
if (($file != '.') && ($file != '..')) {
if (is_dir($src . '/' . $file)) {
@igodorogea
igodorogea / commandline
Last active September 17, 2015 13:36 — forked from sorenmalling/commandline
Installing TYPO3 CMS 7.4 with composer and typo3_console
# Just read the help
soren@kevin  ~/Sites/typo3-hyttekort  ./typo3cms help install:setup
Alpha version of a setup command. Use with care and at your own risk!
COMMAND:
typo3_console:install:setup
USAGE:
/Users/soren/Sites/typo3-hyttekort/./typo3cms ./typo3cms install:setup [<options>]
@igodorogea
igodorogea / Vagrantfile
Created October 25, 2015 11:02 — forked from Jakobud/Vagrantfile
Vagrant Windows 260 character path limit workaround
# If you are using Windows as your Vagrant host OS, there is a limitation in Windows where any given folder path
# cannot be more than 260 characters long. This becomes a problem with Vagrant because, for example, if you
# install a Linux guest environment and try to create a deep directory structure in a synced folder, Linux will
# throw errors. This is because the synced folder is under the constraints of the Windows host. A common example
# of this happening is when installing node.js modules. NPM is known for creating some very long, deep
# folder paths because each node depenency has it's own dependencies, which have their own dependencies, etc...
#
# This gist solves the problem and works around the Windows 260 character path limit. Add it to your Vagrantfile.
#
# NOTE: This bug in Vagrant was fixed in 1.7.3, but reverted back in 1.7.4 due to some regression bugs.
# Based on https://gist.github.com/fernandoaleman/5083680
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
$($0).find('path').each(function(idx, path) {
var coords = $(path)
.attr('d')
.split(' ')
.filter(function(el) {
return /^(M|L)/.test(el);
})
.map(function(el) {
return el.replace(/^(M|L)/, '').split(',');
});
@igodorogea
igodorogea / deb-init.sh
Last active April 27, 2016 10:16
Debian Jessie php development environment
#!/bin/bash
function say {
printf "\n--------------------------------------------------------\n"
printf "\t$1"
printf "\n--------------------------------------------------------\n"
}
say "Prepare machine..."