php
in your pathgit
- your php projects should have phpunit installed
- download all files, rename them removing the
.sh
extension. chmod +x
each of them- copy
git-mrm
andgit-ddev
to a folder in your executable path e.g./usr/local/bin
<?php | |
class PaystackFees | |
{ | |
const DEFAULT_PERCENTAGE = 0.015; | |
const DEFAULT_ADDITIONAL_CHARGE = 10000; | |
const DEFAULT_THRESHOLD = 250000; | |
const DEFAULT_CAP = 200000; | |
public static $default_percentage = PaystackFees::DEFAULT_PERCENTAGE; |
function PaystackFee() { | |
this.DEFAULT_PERCENTAGE = 0.015; | |
this.DEFAULT_ADDITIONAL_CHARGE = 10000; | |
this.DEFAULT_THRESHOLD = 250000; | |
this.DEFAULT_CAP = 200000; | |
this.percentage = this.DEFAULT_PERCENTAGE; | |
this.additional_charge = this.DEFAULT_ADDITIONAL_CHARGE; | |
this.threshold = this.DEFAULT_THRESHOLD; | |
this.cap = this.DEFAULT_CAP; |
function clean_number($phone_number){ | |
$phone_number = preg_replace('/^0/','234',$phone_number); | |
$phone_number = preg_replace('/^\+/','',$phone_number); | |
return $phone_number; | |
} | |
// This should convert a number like 09023293092 or +2349023293092 to 2349023293092 |
This example assumes your running a recent Ubuntu with upstart installed and you have install n
from npm
.
To see an example use of this ina a wider context, look at this gist for deploying node.js + nginx
Adapt as required.
node.conf
in /etc/init/
/etc/node
node-test.conf
inside /etc/node
/var/logs/node
CREATE TABLE City ( | |
ID BIGSERIAL, | |
Name varchar(35) NOT NULL DEFAULT '', | |
CountryCode varchar(3) NOT NULL DEFAULT '', | |
District varchar(20) NOT NULL DEFAULT '', | |
Population int NOT NULL DEFAULT '0' | |
) | |
; |