Skip to content

Instantly share code, notes, and snippets.

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

Arthur Kennedy Otieno TheBeachMaster

😈
👨‍💻
View GitHub Profile
@TheBeachMaster
TheBeachMaster / compact.cpp
Created January 21, 2019 11:09 — forked from Wunkolo/compact.cpp
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
static int internal_get_and_notify_call_statistics(pjsua_call_id call_id, long comm_id)
{
pj_status_t status = PJ_SUCCESS;
pjsua_stream_stat stat;
int LOCAL_DELAY = 30;
float R;
float a = 0.0f; //iLBC a = 10;
float b = 19.8f;
float c = 29.7f;
int rx_pkts = 0;
@TheBeachMaster
TheBeachMaster / install virtualenv ubuntu 16.04.md
Created June 8, 2018 11:20 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@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

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 / 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/ &&\