Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<freightRate:FreightRateResponse xmlns:freightRate="http://www.ups.com/XMLSchema/XOLTWS/FreightRate/v1.0">
<common:Response xmlns:common="http://www.ups.com/XMLSchema/XOLTWS/Common/v1.0">
<common:ResponseStatus>
<common:Code>1</common:Code>
<common:Description>Success</common:Description>
</common:ResponseStatus>
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class FreightRatesAndService {
protected $username = '';
protected $password = '';
protected $accessKey = '';
protected $sandbox = '';
protected $endpointUrl = '';
protected static $endpointUrls = array(
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

Multiple PHP version under Ubuntu 12.04 or 14.04

Update your machine

sudo apt-get update
sudo apt-get upgrade

Install some dependencies

sudo apt-get install build-essential

Install ssmtp

sudo apt-get update
sudo apt-get install ssmtp

Check where the binary and the ssmtp.conf file ended up. You’ll need to know the locations for the following steps:

whereis ssmtp
ssmtp: /usr/sbin/ssmtp /etc/ssmtp /usr/share/man/man8/ssmtp.8.gz

Multiple PHP version under Ubuntu 12.04 or 14.04

Update your machine

apt-get update
apt-get upgrade

Install some dependencies

apt-get install build-essential

/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/

(from http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. cd ~
  2. wget http://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
  3. sudo mv ~/phantomjs-1.9.1-linux-x86_64.tar.bz2 /usr/local/share
  4. cd /usr/local/share
  5. sudo tar xvf phantomjs-1.9.1-linux-x86_64.tar.bz2
  6. sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64 /usr/local/share/phantomjs
  7. sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  8. phantomjs --version
@Evan-R
Evan-R / es.sh
Last active December 16, 2015 07:49
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.deb
sudo dpkg -i elasticsearch-1.3.4.deb