Skip to content

Instantly share code, notes, and snippets.

View shbatm's full-sized avatar

shbatm shbatm

View GitHub Profile
@shbatm
shbatm / default.conf
Created January 15, 2019 01:26 — forked from fmaul/default.conf
nginx config that uses the oauth2-proxy (via auth_request) to authenticate against gitlab and then proxies all requests to a backend service while setting the auth headers X-User and X-Email
server {
listen 80;
server_name localhost;
location /oauth2/ {
proxy_pass http://oauth-proxy:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
@shbatm
shbatm / output.md
Created January 3, 2019 04:00
MMM-AlexaOnOff Sample Install
pi@bookcase2:~ $ cd MagicMirror/modules/
pi@bookcase2:~/MagicMirror/modules $ git clone git@github.com:shbatm/MMM-AlexaOnOff.git
Cloning into 'MMM-AlexaOnOff'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 32 (delta 12), reused 14 (delta 2), pack-reused 0
Receiving objects: 100% (32/32), 10.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (12/12), done.
@shbatm
shbatm / README.md
Created December 16, 2018 21:20
Running diyHue on a non-default HTTP and HTTPS port

How to use non-default Ports for diyHue Project using NGINX

This GIST contains the files required to be modified in order to run diyHue on non-default HTTP and HTTPS ports.

This example uses ports 8080 for HTTP and 8443 for HTTPS and redirects the necessary paths from NGINX's default site.

Changes made to diyHue Files

The following lines must be changed in the diyHue source code, as there is no option provided to change the ports by default.

@shbatm
shbatm / README.md
Last active October 24, 2017 12:51
Setting up NodeLink as service on Raspberry Pi

NodeLink AutoStart on Raspberry Pi (Raspbian Stretch)

The scripts included in this Gist are designed to start io_guy's NodeLink.exe as a startup service on a Raspberry Pi running Rasbian Stretch.

Installation

  1. Follow the installation instructions for setting up NodeLink here.
  2. STOP when you get to "Setting up rc.local"
  3. Copy the contents of the file below to a file called installService.sh in the same folder as NodeLink.exe on your RPi:
  4. Install the systemd service by running:
@shbatm
shbatm / config.js
Created July 31, 2017 20:19
MMM-RTSPStream Multi Camera Example Config
{
module: "MMM-RTSPStream",
position: "middle_center",
header: "Camera Streams",
config: {
autoStart: false,
rotateStreams: false,
moduleWidth: 1120,
moduleHeight: 784,
stream1: {
@shbatm
shbatm / config_remote.js
Created July 16, 2017 04:03
MagicMirror Sample Config.js for Remote Sockets
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
@shbatm
shbatm / mm.json
Created July 9, 2017 19:31
PM2 Ecosystem File for Automatically Restarting the MM2 when config file changed
{
"apps":[
{
"name":"mm",
"script":"./mm.sh",
"cwd":"/home/pi",
"watch":[
"/home/pi/MagicMirror/config/config.js"
],
"watch_options":{