Skip to content

Instantly share code, notes, and snippets.

View mtvbrianking's full-sized avatar

Brian Matovu mtvbrianking

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CKEditor</title>
</head>
@mtvbrianking
mtvbrianking / tinymce_demo.html
Created September 28, 2016 06:57
Live edit and preview using TinyMCE editor
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Live Edit & Preview</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style type="text/css">
@mtvbrianking
mtvbrianking / demo_tinymce.html
Created September 29, 2016 11:36
Dynamically add and remove Tinymce 4.x
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dynamically add and remove Tinymce 4</title>
<link rel="stylesheet" href="bootstrap.min.css" type="text/css" media="all">
</head>
<body>
<div class="container">
@mtvbrianking
mtvbrianking / webcam-cv2.py
Created January 23, 2017 12:59 — forked from tedmiston/webcam-cv2.py
Display the webcam in Python using OpenCV (cv2)
'''
Simply display the contents of the webcam with optional mirroring using OpenCV
via the new Pythonic cv2 interface. Press <esc> to quit.
'''
import cv2
def show_webcam(mirror=False):
cam = cv2.VideoCapture(0)
while True:
@mtvbrianking
mtvbrianking / ffmpeg_install.md
Created February 10, 2017 20:45 — forked from jmsaavedra/ffmpeg_install.md
Install FFmpeg on a Linux Box

###Install FFmpeg via CLI on Linux box

These steps walk through installing a static binary of any ffmpeg version on to your linux machine. If you want to compile from source, there are several ways to do so. Here's the official guide. Tested and works on an AWS EC2 Ubuntu instance, but should work on any Linux machine.

  • SSH into your instance and become root
@mtvbrianking
mtvbrianking / training.sh
Created March 6, 2017 07:18 — forked from christianroman/training.sh
Tesseract OCR training new font
#! /bin/bash
# build the environment
mkdir tessenv; cd tessenv
TROOT=`pwd`
mkdir $TROOT/stockfonts; mkdir $TROOT/build; mkdir $TROOT/build/eng
echo "Environment built"
# Get the stock english fonts from Google (old, but they work)
cd $TROOT/stockfonts
GET http://tesseract-ocr.googlecode.com/files/boxtiff-2.01.eng.tar.gz > boxtiff-2.01.eng.tar.gz
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@mtvbrianking
mtvbrianking / Function.Array-Group-By.php
Created June 3, 2018 08:27 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@mtvbrianking
mtvbrianking / .env.travis
Created June 15, 2018 16:10 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a