Skip to content

Instantly share code, notes, and snippets.

View TheBeachMaster's full-sized avatar
😈
👨‍💻

Arthur Kennedy Otieno TheBeachMaster

😈
👨‍💻
View GitHub Profile
@TheBeachMaster
TheBeachMaster / pipelines.yml
Last active April 13, 2018 09:15 — forked from nicobytes/pipelines.yml
Install chrome for CI
image: node:6.9.4
pipelines:
branches:
master:
- step:
script:
- apt-get update; apt-get install -y gettext-base;
- echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
@TheBeachMaster
TheBeachMaster / bash.js
Created March 31, 2018 13:26
Terminal Emulator [WIP]
/* ========================================================================
* Bash.js :p
* ======================================================================== */
var bjs = {
MOBILE_BROWSER_REGEX: /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i,
EMAIL_REGEX: /\S+@\S+\.\S+/,
SEPARATOR_REGEX: / |,/,
AUTOCOMPLETE: ['./signup', 'cat', 'cat README', 'cat signup', 'help', 'clear', 'pwd', 'rm', 'rm README', 'rm signup'],

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@TheBeachMaster
TheBeachMaster / fix.sh
Created February 26, 2018 15:38
Fix Docker WARNING: bridge-nf-call-iptables is disabled on Centos
$ sudo sysctl net.bridge.bridge-nf-call-iptables=1
$ sudo sysctl net.bridge.bridge-nf-call-ip6tables=1
@TheBeachMaster
TheBeachMaster / class.database.php
Last active February 24, 2018 19:21 — forked from jonashansen229/class.database.php
PHP OOP Database class using MySQLi and Singleton.
<?php
class DbConnector {
private $_connection;
private static $_instance;
private $_host = "host";
private $_username = "username";
private $_password = "password";
private $_database = "dbname";
private $_dbport = 3306;
@TheBeachMaster
TheBeachMaster / install-maven-centos.md
Last active February 9, 2018 09:20 — forked from skanjo/install-maven-centos.md
Install Apache Maven on CentOS

For the latest download link check the Apache Maven download page:

https://maven.apache.org/download.cgi

Download Apache Maven

sudo mkdir /opt/src/maven-bin
cd /opt/src/maven-bin && sudo wget "http://www-us.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz"

Create directory and install

@TheBeachMaster
TheBeachMaster / INSTALL
Created February 6, 2018 13:41 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation
###### development tools
sudo apt-get install build-essential python-dev git nodejs-legacy npm gnome-tweak-tool openjdk-8-jdk
### Python packages
sudo apt-get install python-pip python-virtualenv python-numpy python-matplotlib
### pip packages
pip install django flask django-widget-tweaks django-ckeditor beautifulsoup4 requests classifier SymPy ipython
@TheBeachMaster
TheBeachMaster / gist:de111a2538b84ff59b48f781de42a6db
Last active May 27, 2019 09:45 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@TheBeachMaster
TheBeachMaster / Dockerfile
Created January 18, 2018 08:16 — forked from nginx-gists/Dockerfile
NGINX Plus for the IoT: Load Balancing MQTT
# Pull base image. The official docker openjdk-8 image is used here.
FROM java:8-jdk
# Copy HiveMQ to container
COPY hivemq.zip /tmp/
#Install wget and unzip, then download and install HiveMQ.
RUN \
apt-get install -y wget unzip &&\
unzip /tmp/hivemq.zip -d /opt/ &&\
@TheBeachMaster
TheBeachMaster / presentation.js
Created January 6, 2018 11:10
The text presentation on my personal website
// Requires JQuery 3+
var quotes = [
" for a better world",
" for food",
" for fun",
" for the communinity",
" to empower people",
" to keep my job",
" to keep out of trouble",
" to get shit done",