Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
# writing c1 class definition to module mod1 | |
cs = """ | |
class c1(object): | |
att = 1 | |
def m1(self): | |
self.__class__.att += 1 | |
# printing class name, class-id, and the id of the class, which happens to be its memory address | |
print "uno:", self.__class__, "class-id:", id(self.__class__), "att:", self.__class__.att | |
""" |
#!/bin/sh | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# @edited Mateusz Gachowski | |
#################################### | |
showHelp () { |
apt-get remove -y --purge x11-common | |
apt-get autoremove -y --purge | |
apt-get install -y deborphan | |
deborphan | xargs dpkg -P # do this a bunch of times |
error_page 500 /500.html; | |
location /500.html{ | |
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}'; | |
} | |
error_page 502 /502.html; | |
location /502.html{ | |
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}'; | |
} |
#!/bin/bash | |
# This Works is placed under the terms of the Copyright Less License, | |
# see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY. | |
# | |
# COPYRIGHT.CLL can be found at http://permalink.de/tino/cll | |
# (CLL is CC0 as long as not covered by any Copyright) | |
OOPS() { echo "OOPS: $*" >&2; exit 23; } | |
[ -z "`pidof openssl`" ] || OOPS "openssl running, consider: killall openssl" |
# MOVED TO https://github.com/stevejenkins/unifi-linux-utils |
#!/bin/bash | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
set -o allexport | |
source .env | |
set +o allexport |
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
#!/usr/bin/env python | |
from argparse import ArgumentParser | |
from random import SystemRandom | |
from string import ascii_letters, digits | |
from subprocess import Popen as subprocess, PIPE | |
from shlex import split as sh | |
ap = ArgumentParser() | |
ap.add_argument('action', help='add, delete or change password', choices=('add', 'delete', 'passwd')) |