Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Brian Matovu mtvbrianking

🎯
Focusing
Block or report user

Report or block mtvbrianking

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mtvbrianking
mtvbrianking / login.html
Created May 24, 2019
Bootstrap 4 - Minimalist material design vertical, horizontal centered login form
View login.html
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Quicksand:400,500');
body {
background-color: #f1f5f8;
View 3d-cude.css
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
*,
*:before,
*:after {
@mtvbrianking
mtvbrianking / jquery-datatables-buttons.html
Created May 19, 2019
jQuery datatables buttons snippet
View jquery-datatables-buttons.html
<!DOCTYPE html>
<html>
<head>
<title>jQuery Datatables</title>
<!-- Default styling not required with bs stylying. -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.19/css/jquery.dataTables.min.css"> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.19/css/dataTables.bootstrap4.min.css">
View SafeSoapClient.php
<?php
/**
* @link https://gist.github.com/RobThree/2490351 Source #1
* @link https://gist.github.com/RobThree/4117914 Source #2
*/
class SafeSoapClient extends \SoapClient
{
public function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
@mtvbrianking
mtvbrianking / NullableXmlElement.php
Last active May 8, 2019
SimpleXmlElement get empty string as null.
View NullableXmlElement.php
<?php
/**
* NullableXmlElement.
* Customise data from xml object.
* @link http://php.net/manual/en/class.simplexmlelement.php
*/
class NullableXmlElement extends SimpleXMLElement
{
/**
@mtvbrianking
mtvbrianking / install_lamp_18.sh
Created May 8, 2019 — forked from ankurk91/install_lamp_18.sh
Ubuntu 18.04 - PHP development (php 7.2, MySQL 5.7, apache 2.4)
View install_lamp_18.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 18.04 dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@mtvbrianking
mtvbrianking / supervisor-setup.md
Last active Jul 12, 2019
Setup supervisor process monitor, centos
View supervisor-setup.md

[TOC]

Supervisor is a process monitor for the Linux operating system.

Prerequisites

Check CentOS version

sudo rpm -q centos-release

@mtvbrianking
mtvbrianking / max_period_validation.md
Last active Apr 30, 2019
Laravel max allowed period validation
View max_period_validation.md

max_period:start_date,duration,metric

The difference betweent the field under validation, and the start_date field must not be greater than the specified duration in the given metric.

Metrics:

  • hours,
  • days*,
  • weeks,
  • months,
  • years
@mtvbrianking
mtvbrianking / artisan-route-list.php
Created Apr 7, 2019
Laravel PHP Artisan route list
View artisan-route-list.php
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Route;
class HomeController extends Controller
{
/**
* Constructor.
View css-list-styling.html
<!DOCTYPE html>
<html>
<head>
<title>CSS bullet styling</title>
<style type="text/css">
ul {
list-style: none;
padding: 0;
margin: 0;
}
You can’t perform that action at this time.