This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio, inspect, threading | |
from concurrent.futures import ThreadPoolExecutor | |
from functools import wraps | |
def async_to_sync(function): | |
main_loop = asyncio.get_event_loop() | |
def async_to_sync_gen(agen, loop, is_main_thread): | |
async def anext(agen): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Convert a MDB file (Access) to SQL | |
# Needs mdbtools[http://mdbtools.sourceforge.net/] | |
# run 'aptitude install mdbtools' on Debian/Ubuntu | |
# Created by Álvaro Justen <https://github.com/turicas> | |
# License: GPLv2 | |
mdb=$1 | |
sql=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" == "insert" ]; then | |
for cfip in `curl -sw '\n' https://www.cloudflare.com/ips-v{4,6}`; | |
do | |
ufw allow proto tcp from $cfip to any port 80,443 comment 'Cloudflare'; | |
done | |
echo $0 'Inserted' | |
elif [ "$1" == "delete" ]; then | |
while ufw status numbered | grep -q 'Cloudflare'; |