Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@stevehenderson
stevehenderson / default.conf
Created March 6, 2022 05:46
Elastic Kibana XPACK Behind Reverse NGINX Proxy
server {
listen 443 ssl;
server_name ~^kibanasub\.;
root /www/cluster;
ssl_certificate /etc/nginx/certificates/cert1.pem;
ssl_certificate_key /etc/nginx/certificates/privkey1.pem;
ssl_protocols TLSv1.2 TLSv1.3;
@stevehenderson
stevehenderson / github_container_registry.md
Created January 29, 2022 17:35
Github Container Registry

Github Docker Container registry

Set up Docker for github package repo access (One time step):

You'll need a PAT with package write permissions

Then:

@stevehenderson
stevehenderson / graphqlclientlog.md
Created January 23, 2022 15:31
How to increase the machinebox/graphql logging

When using the GraphQL machinebox go library, you can tak control of logging as follows:

graphqlclient.Log = func(s string) { log.Printf("YO: %s",s) }
@stevehenderson
stevehenderson / git_clone_docker.md
Last active January 18, 2022 15:28
Prevent Docker from Caching Git Clone

Issue: When pulling from github inside docker, it won't update the cached docker image.

You can force it to by using the git api to pull down the latest commit meta data and saving that to the image. This works and stays in synch with every new update to your repo, which you want to pull. No commits mean no new meta data so your docker will use the cached version. If you commits, this makes a new SHA which gets pulled in the API, invalidating cached

ADD https://[email protected]/repos/some_org/some_repo/git/refs/heads cachebust
RUN git clone https://[email protected]/some_org/some-repo-git.git
@stevehenderson
stevehenderson / renamed-git-main.md
Created January 4, 2022 00:50
After renaming main

git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a

@stevehenderson
stevehenderson / drive-format-ubuntu.md
Created January 1, 2022 04:23 — forked from keithmorris/drive-format-ubuntu.md
Partition, format, and mount a drive on Ubuntu
@stevehenderson
stevehenderson / nomachine.md
Created December 29, 2021 18:18
nomachine resolution

Installed

apt-get install xserver-xorg-video-dummy

Then

vim /etc/X11/xorg.conf
import scrapy
import re
import json
class FacultySpider(scrapy.Spider):
name = "faculty"
def start_requests(self):
urls = [
'https://compsci.uncg.edu/faculty/minjeong-kim/',
@stevehenderson
stevehenderson / raspberry_pi_camera_vnc.sh
Created October 26, 2020 03:18
raspberry pi stream to vnc
raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264
@stevehenderson
stevehenderson / nodered_green_red_light.json
Created October 12, 2020 21:38
nodered_green_red_light
[
{
"id": "a35b9d70.ae8be",
"type": "tab",
"label": "GREEN-RED DEMO",
"disabled": false,
"info": ""
},
{
"id": "ef262268.43b27",