Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #!/bin/bash | |
| JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
| for JAIL in $JAILS | |
| do | |
| fail2ban-client status $JAIL | |
| done |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Let's say you start a project locally, and do some editing.
$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILENow you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly:
| # Based on https://gist.github.com/fernandoaleman/5083680 | |
| # Start the old vagrant | |
| $ vagrant init ubuntu_saucy | |
| $ vagrant up | |
| # You should see a message like: | |
| # [default] The guest additions on this VM do not match the install version of | |
| # VirtualBox! This may cause things such as forwarded ports, shared | |
| # folders, and more to not work properly. If any of those things fail on |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import codecs | |
| import getpass | |
| import glob | |
| import json | |
| import logging | |
| import lxml.etree |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.
As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).
For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:
| <?xml version="1.0" encoding="utf-8"?> | |
| <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" | |
| xmlns:tns="http://www.drv.gov.ua/" | |
| xmlns:s="http://www.w3.org/2001/XMLSchema" | |
| xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
| targetNamespace="http://www.drv.gov.ua/" | |
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> | |
| <wsdl:types> | |
| <s:schema elementFormDefault="qualified" targetNamespace="http://www.drv.gov.ua/"> |