Skip to content

Instantly share code, notes, and snippets.

View stormwild's full-sized avatar
🏠
Working from home

Alexander R Torrijos stormwild

🏠
Working from home
View GitHub Profile
@stormwild
stormwild / setup.sh
Created June 1, 2016 11:13 — forked from dirkk0/setup.sh
Installing Cloud9 on Amazon EC2
// WARNING - deprecated:
// use this one now: https://gist.github.com/dirkk0/5983271
// kudos to Frederic Cambus
// http://www.cambus.net/setting-up-a-node-js-development-environment-with-npm-and-cloud9-ide-installed-locally/
apt-get install build-essential g++ libssl-dev curl git
apt-get install libxml2-dev
@stormwild
stormwild / doit.sh
Created June 1, 2016 11:25 — forked from dirkk0/doit.sh
Installing Cloud9 on Amazon EC2 (revisted, Cloud9 v0.7)
sudo apt-get update
# get ec2 ip and hostname
sudo apt-get install -y build-essential g++ libssl-dev apache2-utils git libxml2-dev screen
#install node
git clone https://github.com/joyent/node.git
# git checkout v0.10.13 did work once, but I couldn't work again, so I fell back to 0.8
#compilation takes over 30 minutes on a t1.micro
@stormwild
stormwild / nginx.default.conf
Created June 2, 2016 06:32 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@stormwild
stormwild / nginx.conf.default
Created June 2, 2016 10:23 — forked from nishantmodak/nginx.conf.default
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@stormwild
stormwild / git-export.md
Last active December 3, 2024 12:38 — forked from kristofferh/git-export
"Export" a git repository to zip file
@stormwild
stormwild / gist:a48b6de1a9c35eec320340c0f1edf101
Created June 24, 2016 08:58
PHP: minimal example of SOAP Server and Client
<?php
// server
class MySoapServer
{
public function getMessage()
{
return 'Hello,World!';
}
@stormwild
stormwild / User.php
Created July 3, 2016 12:29 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@stormwild
stormwild / Install Composer using MAMP's PHP.md
Created July 4, 2016 01:30 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@stormwild
stormwild / functions.php
Created July 20, 2016 08:11 — forked from WebEndevSnippets/functions.php
WooCommerce: Add Prefix to WooCommerce Order Number
add_filter( 'woocommerce_order_number', 'webendev_woocommerce_order_number', 1, 2 );
/**
* Add Prefix to WooCommerce Order Number
*
*/
function webendev_woocommerce_order_number( $oldnumber, $order ) {
return 'WE' . $order->id;
}
@stormwild
stormwild / PHPExcel_Basics.md
Created September 26, 2016 08:38 — forked from r-sal/PHPExcel_Basics.md
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet: