Skip to content

Instantly share code, notes, and snippets.

View ChristianHohlfeld's full-sized avatar
👋
Hi there!

Chris Field ChristianHohlfeld

👋
Hi there!
View GitHub Profile
@vukhanhtruong
vukhanhtruong / README.md
Last active October 1, 2023 07:31
Multiple WordPress Sites on Docker with Letsencrypt

Host Multiple WordPress Sites behind Nginx Proxy

With the following “Docker recipe”, you will set up a Docker node running separate WordPress installation on two domains or subdomains. This setup is pretty much production ready, with:

  • nginx reverse proxy by Jason Wilder that automatically routes traffic to new containers that are created with the VIRTUAL_HOST=sub.domain.com environment variable. This nifty container performs a similar function to Traefik or HAProxy, but it is amazingly simple to use.
  • letsencrypt-nginx-proxy-companion by Yves Blusseau that obtains an SSL certificate from Let’s Encrypt, the free Certificate Authority, when you specify the LETSENCRYPT_HOST and LETS_ENCRYPT_EMAIL environment variables on any application container (i.e. WordPress) that needs to be served over HTTPS. The companion even pings Let’s Encrypt every 90 days to automatically renew your certificates!
  • Of
@gaearon
gaearon / index.html
Last active May 23, 2024 11:08
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 23, 2024 16:23
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@AndreiMarukovich
AndreiMarukovich / docker-compose.yaml
Last active November 8, 2023 07:11
Docker Compose configuration for running TeamCity, build agents and PostgreSQL in Docker containers
version: '2'
services:
postgres:
image: postgres:latest
volumes:
- /srv/postgresql/data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=<your-password>
- POSTGRES_USER=teamcity
@0xjac
0xjac / private_fork.md
Last active May 24, 2024 08:54
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@vendettamit
vendettamit / ReferenceFinder.cs
Created October 7, 2015 21:06
This is a sample code that can be used to find references using Roslyn version Microsoft.CodeAnalysis 1.0.0
class ReferenceFinder
{
public void Find(string methodName)
{
string solutionPath = @"C:\Users\achoudhary\Documents\Visual Studio 2013\Projects\ConsoleForEverything\ConsoleForEverything.sln";
var msWorkspace = MSBuildWorkspace.Create();
List<ReferencedSymbol> referencesToMethod = new List<ReferencedSymbol>();
Console.WriteLine("Searching for method \"{0}\" reference in solution {1} ", methodName, Path.GetFileName(solutionPath));
@drewsberry
drewsberry / UE4-build.bat
Last active February 21, 2024 07:33
UE4 Windows command line building
:: Build client
RunUAT BuildCookRun -project="full_path.uproject"^
-noP4 -platform=Win64^
-clientconfig=Development -serverconfig=Development^
-cook -allmaps -build -stage^
-pak -archive -archivedirectory="Output Directory"
:: Cook client
RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^
-noP4 -platform=Win64^
@mikesmullin
mikesmullin / watch.sh
Last active April 26, 2023 05:20
watch is a linux bash script to monitor file modification recursively and execute bash commands as changes occur
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#