Skip to content

Instantly share code, notes, and snippets.

View thinkadoo's full-sized avatar

Andre Venter thinkadoo

  • Freelance
  • Hermanus
View GitHub Profile
@thinkadoo
thinkadoo / ubuntu-php-development-environment.md
Created November 18, 2012 13:49 — forked from DaRaFF/ubuntu-php-development-environment.md
Ubuntu php development environment

#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 live environment!

I hope it's a help also for you!

#Installation stack

@thinkadoo
thinkadoo / gist:4105395
Created November 18, 2012 13:54 — forked from RaVbaker/gist:2967695
[HOWTO] Ubuntu 12.04 Ruby on Rails Development Environment

Ubuntu 12.04 Ruby on Rails Development Environment

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.

Step 1: Get the repos ready and run updates.

sudo apt-get update && sudo apt-get upgrade
@thinkadoo
thinkadoo / post.md
Created November 18, 2012 15:55 — forked from kbond/post.md
Ubuntu PHP Development Environment Setup

Install git/subversion:

sudo apt-get install git subversion

Configure Git:

git config --global user.name "Your Name"
git config --global user.email "Your Email"

ssh-keygen -t rsa -C "Your Email"

try{
document.createEvent("TouchEvent");
// Here we're ensured touch capabilities
var scroll = document.getElementById('myid');
var start = null;
var clickIfEnd = true;
scroll.addEventListener('touchstart', function (e) {
start = e.touches[0].pageX;
clickIfEnd = true;
Thanks to:
http://realityloop.com/blog/2012/07/03/nginx-mariadb-php-aegir-mac-os-x-optional-drush-5-works-mountain-lion
and
http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
--Fresh install Mountain Lion.
--Install XCode 4.4.2
--Install Command line utilities via Xcode
--Install Homebrew
@thinkadoo
thinkadoo / assets.php
Created June 1, 2013 23:09
Module Assets Controller for CIBonfire HMVC
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class assets extends CI_Controller {
function __construct() {
parent::__construct();
@thinkadoo
thinkadoo / content.php
Created June 2, 2013 09:35
Function assets for CIBonfire Controller - helps to serve css, js, images, ejs etc. from the module folder
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class content extends Admin_Controller {
//--------------------------------------------------------------------
public function __construct()
{
parent::__construct();
@thinkadoo
thinkadoo / MY_Controller.php
Last active December 17, 2015 23:59
Changed CIBonfire Admin_Controller to include returning media types from Module folder structure
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Bonfire
*
* An open source project to allow developers get a jumpstart their development of CodeIgniter applications
*
* @package Bonfire
* @author Bonfire Dev Team
* @copyright Copyright (c) 2011 - 2013, Bonfire Dev Team
* @license http://guides.cibonfire.com/license.html
<!DOCTYPE html>
<html ng-app="rootApp">
<head>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.7/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.9.0/ui-bootstrap-tpls.min.js"></script>
<meta charset=utf-8 />
<title>Bootstrap</title>
</head>
<body>
// Modifies $httpProvider for correct server communication (POST variable format)
angular.module('httpPostFix', [], function($httpProvider)
{
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
// Override $http service's default transformRequest
$httpProvider.defaults.transformRequest = [function(data)
{
/**