Skip to content

Instantly share code, notes, and snippets.

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"
@BretFisher
BretFisher / README.md
Last active May 1, 2023 02:28
Simple Apache + Nginx Reverse Proxy Example in Docker Compose
  1. download these two files to the same directory
  2. docker-compose up
  3. http://localhost should show you "it works" which is apache being reverse-proxied through nginx
  4. docker sets up DNS for web based on compose service name so the nginx front-end can find http://web
  5. proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
@bekce
bekce / README.md
Created February 21, 2017 13:36
ldap server with mysql backend

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.

Instructions:

  1. Create the database and table with insert.sql
@bitsgalore
bitsgalore / loggingGUI.py
Created January 31, 2017 13:43
Minimal threaded GUI application with logging to both text file and ScrolledText widget
#! /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
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# 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)
@piaoger
piaoger / git-sync-all-branches.sh
Created August 31, 2015 01:34
git-sync-all-branches
# 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
@jackqt
jackqt / OutlookCalendar.py
Created April 30, 2015 10:34
Fetch calendar information of outlook from win32com API
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
# 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
@leoj3n
leoj3n / Git-and-GitHub-tools.md
Last active April 11, 2017 01:59
A big list of links to Git and GitHub tools!
@abishur
abishur / menu_launcher.py
Last active May 15, 2024 03:38
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)