Moved to here.
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
# Tested on CentOS7/AWS | |
$ sudo adduser borg-1 | |
$ sudo adduser borg-2 | |
$ sudo yum install -y borgbackup | |
$ sudo mkdir /mnt/repo | |
$ sudo chown borg-1:borg-1 repo | |
# Allow access to other users | |
$ sudo -u borg-1 borg mount -o allow_other [email protected]:repo /mnt/repo | |
$ ll |
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
/* Optional CSS to customize fonts, colors, syntax highlighting. */ | |
/* Normal */ | |
@font-face { | |
font-family: Roboto; | |
src: url(~/Library/Fonts/Roboto/Roboto-Light.ttf); | |
} | |
/* Bold */ | |
@font-face { |
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
""" | |
This is an adjusted version of the official simpletreemodel[1] that adds lazy loading and uses a dict as backend. | |
Instead of the dict it could also use a database or similar. Items are only loaded when expanded, which allows | |
for speedy startup-time, even with 2.5m items. | |
1: https://github.com/baoboa/pyqt5/tree/master/examples/itemviews/simpletreemodel | |
""" | |
import sys |
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
--- | |
- name: Install Tensorflow and Keras on ubuntu1604 | |
hosts: all | |
become: yes | |
handlers: | |
- include: roles/common/handlers/main.yml | |
vars: | |
- cuda_network_installer: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
- cuda_apt_key: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub |
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 xml.etree.ElementTree as ET | |
import requests | |
import re | |
import logging as log | |
log.basicConfig(level=log.ERROR) | |
log.getLogger("requests").setLevel(log.WARNING) | |
# USAGE: | |
# 1. Run Nmap on your hosts. This will already match some versions. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/usr/bin/env python2 | |
""" | |
Semi-manual script to download trips and cost. | |
Currently needs manual steps in 2 places. And chrome-selenium. | |
(or any other Selenium browser) | |
You also want to adapt the currencies to your needs. |
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
#!/usr/bin/env python | |
""" | |
Update Cloudflare zone entry to current external IP. | |
Works great with servers on changing IPs or AWS spot instances. | |
Usage: | |
python cloudflare_update.py subdomain |
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
#!/usr/bin/env python | |
import os | |
import sys | |
from markdown2 import markdown | |
from xhtml2pdf import pisa | |
""" | |
## Inspired by |
NewerOlder