Skip to content

Instantly share code, notes, and snippets.

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

Arthur Kennedy Otieno TheBeachMaster

😈
👨‍💻
View GitHub Profile
@TheBeachMaster
TheBeachMaster / app.js
Last active September 20, 2017 18:41
Sample Africa's Talking USSD Node App
var express = require('express')
var app = express()
var options = {
sandbox: true, //false if going to prod
apiKey: '', //Your Africas Talking Sandox or Live Key
username: '', // Your Username: "sandbox" for testing...
format: 'json'
};
var AfricasTalking = require('africastalking')(options);
@TheBeachMaster
TheBeachMaster / mainApp.xml
Created September 28, 2017 14:58
Africa's Talking Voice Examples
<?xml version="1.0" encoding="UTF-8"?>
<!-- When your app is hit,this is the response -->
<Response>
<GetDigits timeout="5" numDigits="1"> <!--Give the user 5 secons to respond...When Key 1 is pressed do something...-->
<Play url="https://someURLwhereYourMP3Resides/media/file.wav/orfile.mp3"> <!--Play some music as we wait -->
</Play>
</GetDigits>
<Redirect>
https://toSomeOtherUrlThatcanHandletheirRequest.com/stuff
</Redirect>
@TheBeachMaster
TheBeachMaster / gist:b4d1346358ec3ecb1d1edee85fd8a651
Created October 9, 2017 13:32 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@TheBeachMaster
TheBeachMaster / boardinfo.h
Created October 16, 2017 09:51
A header file that's gets Arduino Board Info
#if defined(TEENSYDUINO)
// --------------- Teensy -----------------
#if defined(__AVR_ATmega32U4__)
#define BOARD "Teensy 2.0"
#elif defined(__AVR_AT90USB1286__)
#define BOARD "Teensy++ 2.0"
#elif defined(__MK20DX128__)
#define BOARD "Teensy 3.0"
@TheBeachMaster
TheBeachMaster / Esp8266GetConnectedDeviceMac.ino
Created October 23, 2017 14:05
a little sketch which shows the use of the new WiFi events and gives the IP address of freshly SOFT_AP connected devices . →https://github.com/esp8266/Arduino/issues/2100#issuecomment-298753397
#include <ESP8266WiFi.h>
// include plain C library
extern "C" {
#include "user_interface.h"
}
#define YOUR_WIFI_SSID "******-******"
#define YOUR_WIFI_PASSWD "******-******"
boolean waitingDHCP=false;
sudo yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel
wget https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz
tar xf v2.1.0.tar.gz
cd libwebsockets-2.1.0
mkdir build; cd build
cmake .. -DLIB_SUFFIX=64
sudo make install
echo "/usr/local/lib64" | sudo tee -a /etc/ld.so.conf.d/libwebsockets.conf
sudo ldconfig
ldconfig -p | grep libwebsockets
@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",
@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 / 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 / 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