Skip to content

Instantly share code, notes, and snippets.

View ladaposamuel's full-sized avatar
🐝
buzzzz

Samuel Ladapo ladaposamuel

🐝
buzzzz
  • Lagos , Nigeria
View GitHub Profile
@ladaposamuel
ladaposamuel / git-deployment.md
Created January 30, 2018 16:59 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@ladaposamuel
ladaposamuel / number_unformat.php
Created January 30, 2018 11:05 — forked from msng/number_unformat.php
Unformats a number formatted with number_format().
<?php
function number_unformat($number, $force_number = true, $dec_point = '.', $thousands_sep = ',') {
if ($force_number) {
$number = preg_replace('/^[^\d]+/', '', $number);
} else if (preg_match('/^[^\d]+/', $number)) {
return false;
}
$type = (strpos($number, $dec_point) === false) ? 'int' : 'float';
$number = str_replace(array($dec_point, $thousands_sep), array('.', ''), $number);
settype($number, $type);
@ladaposamuel
ladaposamuel / ubuntu_agnoster_install.md
Created January 28, 2018 15:15 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@ladaposamuel
ladaposamuel / bbcode.php
Created December 5, 2015 22:56 — forked from neo22s/bbcode.php
BBcode parser example
<?php
/**
* BBcode helper class
*
* @package BBcode
* @category Helper
* @author Chema <chema@garridodiaz.com>
* @copyright (c) 2012
* @license GPL v3
*/