- download these two files to the same directory
- docker-compose up
- http://localhost should show you "it works" which is apache being reverse-proxied through nginx
- docker sets up DNS for
web
based on compose service name so the nginx front-end can find http://web - proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
traefik: | |
image: traefik | |
command: --web --docker --docker.swarmmode --docker.watch --docker.domain=cirrus.io --logLevel=DEBUG | |
ports: | |
- "80:80" | |
- "8080:8080" | |
- "443:443" |
I wanted to build an LDAP server that queries a MySQL server to fetch users and check their passwords. It is mainly used for old software that does not work with custom OAuth2 providers. Redmine is an example of this.
- ldapjs: library to start-off LDAP servers from scratch
- node.js driver for mysql: to connect to a mysql server
Instructions:
- Create the database and table with
insert.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import time | |
import threading | |
import logging | |
try: | |
import tkinter as tk # Python 3.x | |
import tkinter.scrolledtext as ScrolledText | |
except ImportError: | |
import Tkinter as tk # Python 2.x | |
import ScrolledText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fetch all branches | |
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches | |
#!/bin/bash | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do | |
git branch --track ${branch##*/} $branch | |
done | |
git fetch --all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from win32com.client import Dispatch | |
from tabulate import tabulate | |
import datetime | |
import pdb | |
OUTLOOK_FORMAT = '%m/%d/%Y %H:%M' | |
outlook = Dispatch("Outlook.Application") | |
ns = outlook.GetNamespace("MAPI") | |
appointments = ns.GetDefaultFolder(9).Items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lifted cool stuff from: | |
# https://github.com/fish-shell/fish-shell/blob/master/share/functions/fish_prompt.fish | |
# https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/sample_prompts/robbyrussell.fish | |
function fish_prompt | |
# define git functions if not already defined | |
if not set -q -g __fish_git_functions_defined | |
set -g __fish_git_functions_defined | |
function _git_branch_name |
A big list of links to Git and GitHub tools!
NewerOlder