Skip to content

Instantly share code, notes, and snippets.

View Brawn1's full-sized avatar

Günter Bailey Brawn1

View GitHub Profile
@Brawn1
Brawn1 / NGINX_SSL_Proxy_docker-compose.yaml
Last active May 27, 2018 15:24
Docker Compose script for easy setup jwilder Nginx-Reverse Proxy with Letsencrypt-Companion https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
version: '2.0'
services:
nginx-proxy:
restart: always
image: jwilder/nginx-proxy:latest
ports:
- '80:80'
- '443:443'
volumes:
@Brawn1
Brawn1 / ntp-ckeck.py
Last active March 29, 2018 13:36
Simple NTP Network Scanner to scan class C Network for NTP Server.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#################################################################
# programm to scan and check ntp servers in class C Network #
# requirements: tool ntpdate #
# @author: Bailey #
# @date: 2017-11-28 #
# MIT License #
#################################################################
import json
#!/usr/bin/env python
# Author: David Huss
# Website: http://blog.atoaudiovisual.com
# Usage instructions http://blog.atoav.com/2013/09/restore-broken-deja-dup-backup-hand/
# Modified by Antonio Roberts to preserve folder structure
import Tkinter as tk
from tkFileDialog import *
import sys, os
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@timmyomahony
timmyomahony / extra_cms_tags.py
Last active March 5, 2019 12:33
A template tag for `django-cms` that allows a placeholder to be rendered and placed in a context variable so that the placeholder can be conditionally loaded. This code was originally submitted on the `django-cms` Google Group by Benoit Domingue: https://groups.google.com/forum/#!topic/django-cms/WDUjIpSc23c/discussion
from classytags.arguments import Argument, MultiValueArgument
from classytags.values import StringValue
from cms.templatetags.cms_tags import Placeholder, PlaceholderOptions
from cms.models.placeholdermodel import Placeholder as PlaceholderModel
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@sente
sente / formatXML.js
Last active February 27, 2025 20:15
javascript to format/pretty-print XML
The MIT License (MIT)
Copyright (c) 2016 Stuart Powers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: