Skip to content

Instantly share code, notes, and snippets.

View goodtiding5's full-sized avatar
💭
I may be slow to respond.

Kenneth Zhao goodtiding5

💭
I may be slow to respond.
  • Penguin Digital, Ltd.
  • California, USA
View GitHub Profile
@goodtiding5
goodtiding5 / README.md
Created February 11, 2020 20:19 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@goodtiding5
goodtiding5 / flask-permission-for-cookies.md
Created June 18, 2019 07:33
Flask: permission for cookies
  1. Mandate a banner on any page base.html
{% if cookies_check() %}
        {# then user has already consented so no requirement for consent banner #}
{% else %}
        {# show a cookie consent banner #}
        <div id="cookie-consent-container">
            <button id="cookie-consent">I Consent</button>
        </div>
 
@goodtiding5
goodtiding5 / nginx-example-host-conf
Created January 24, 2019 01:06
Basic Nginx Host conf
server {
listen 80;
listen [::]:80;
server_name www.example.com example.com;
root /var/www/example.com;
index index.html;
location ^~ /.well-known/acme-challenge/ {

Development Software

  • VirtualBox - Virtualization software for running local operating systems within your computer. This allows us have a full version of linux within our computers that better match how a live webserver works.
  • Vagrant - A tool for provisioning (creating) virtual machines.
  • VVV - A pre-built, community-supported Vagrant configuration for WordPress development.
  • Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
  • SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
  • Github.com - A website that provides free Git repositories for both open source and private projects.
  • SASS - (SCSS) A CSS preprocessing implementation that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.

Keybase proof

I hereby claim:

  • I am goodtiding5 on github.
  • I am goodtiding5 (https://keybase.io/goodtiding5) on keybase.
  • I have a public key ASDp7zZq5IVvnMGqMO8lAMB43UhFqz6FKsG5BhJGhOeFMwo

To claim this, I am signing this object:

@goodtiding5
goodtiding5 / caddy-for-zeronet.md
Created November 29, 2017 00:48
Caddy proxy for zeronet

This is for caddy 0.10.10

host.domain.tld {
  # Enable HSTS
  header / Strict-Transport-Security "max-age=31556926"
  header / X-Frame-Options "SAMEORIGIN"
  header / X-XSS-Protection "1; mode=block"

 tls {
@goodtiding5
goodtiding5 / nginx-proxy-for-zeornet.md
Last active November 16, 2020 05:58
The working nginx proxy config for zeronet

The working nginx config for zeronet

server {
    listen 443 ssl;

    server_name        url;
    ssl on;
    ssl_certificate        /etc/letsencrypt/live/url/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/url/privkey.pem;

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

  1. run a docker a container from the image we wish to modify
  2. modify the docker container
  3. commit the changes to the container as a docker image
  4. test changes made to image

1.) Running a docker container from an image