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 / google-maps-place-share-link.js
Last active Aug 9, 2019
Generate Google Maps place shareable link.
View google-maps-place-share-link.js
@mtvbrianking
mtvbrianking / centos-cron-jobs.md
Created Jul 8, 2019
Setup cron jobs on centos
View centos-cron-jobs.md

Centos cron jobs

  1. Let's create a directory this purpose.

# cd

[root@server ~]# mkdir crontests

[root@server ~]# cd crontests

@mtvbrianking
mtvbrianking / XMLElement.php
Created Jul 6, 2019
Custom xml element - with default value getter
View XMLElement.php
<?php
/**
* Custom XML element.
*/
class XMLElement extends \SimpleXMLElement
{
/**
* Provides access to element's children.
*
@mtvbrianking
mtvbrianking / auto-deploying.md
Created Jun 26, 2019 — forked from nickbclifford/auto-deploying.md
How to automatically deploy code to a server using Travis CI
View auto-deploying.md

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...

Users

@mtvbrianking
mtvbrianking / digital-ocean-apache-php-mysql-https.md
Created May 29, 2019
Setup digital ocean apache web server php mysql
View digital-ocean-apache-php-mysql-https.md

Login

root@ubuntu-512mb-nyc3-01:~# ssh root@xxx.xxx.xxx.xxx

Update package manager

root@ubuntu-512mb-nyc3-01:~# apt-get update

root@ubuntu-512mb-nyc3-01:~# apt-get upgrade

@mtvbrianking
mtvbrianking / test-artisan-command.md
Last active May 28, 2019
Test artisan command consumes external API using service container injection.
View test-artisan-command.md
interface ClientInterface
{
    public function request($method, $uri, $headers = [], $body = []);
}
class Client implements ClientInterface
{
@mtvbrianking
mtvbrianking / pie-chart-custom-legend.html
Created May 26, 2019
ChartJS pie chart with custom legend in table.
View pie-chart-custom-legend.html
<!DOCTYPE html>
<html>
<head>
<title>ChartJS Pie Chart Lengend.</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"/> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/solid.min.css" rel="stylesheet"/>
@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">
You can’t perform that action at this time.