RCFs we will read!
Terms: https://tools.ietf.org/html/rfc2119
RFC Statuses: https://en.wikipedia.org/wiki/Request_for_Comments
TOTP - https://tools.ietf.org/html/rfc6238 Evil bit - https://tools.ietf.org/html/rfc3514
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import time | |
VERBOSE = False | |
def wait(seconds): |
from lxml import etree | |
CLASS_EXPR = "contains(concat(' ', normalize-space(@class), ' '), ' {} ')" | |
def has_class(context, *classes): | |
""" | |
This lxml extension allows to select by CSS class more easily |
RCFs we will read!
Terms: https://tools.ietf.org/html/rfc2119
RFC Statuses: https://en.wikipedia.org/wiki/Request_for_Comments
TOTP - https://tools.ietf.org/html/rfc6238 Evil bit - https://tools.ietf.org/html/rfc3514
#!/bin/bash | |
# This script assumes you're using the directory layout described in the | |
# documentation at: https://voc.readthedocs.io/en/latest/tutorials/tutorial-0.html | |
set -e | |
set -x | |
abort() { | |
echo "$*"; exit 1; | |
} |
import toga | |
from collections import namedtuple | |
# Structure of the main data source of the tree | |
GRADES = namedtuple('Grades', 'cl grade') | |
class TreeStructure: | |
def __init__(self): | |
# Data source of the tree | |
self.data = ( |
#!/bin/bash | |
# For arrow-keys history and other cmdline goodies, install rlwrap and replace | |
# the first line by: #!/usr/bin/rlwrap bash | |
# This is a hack to simulate a REPL for VOC (http://pybee.org/voc) | |
# | |
# Behind the scenes, every time you try a new expression it appends it to a temporary | |
# file, recompiles it and re-runs it, omitting the previous output. | |
# | |
# This has the caveat that if some expression you enter raises an exception, |
# Scrapyd local proxy for basic authentication. | |
# Don't forget iptables rule. | |
# iptables -A INPUT -p tcp --destination-port 6800 -s ! 127.0.0.1 -j DROP | |
server { | |
listen 6801; | |
location ~ /\.ht { | |
deny all; | |
} |
import urwid | |
class SelectableText(urwid.Text): | |
def selectable(self): | |
return True | |
def keypress(self, size, key): | |
return key | |
content = urwid.SimpleListWalker([ |
import os | |
import signal | |
from gi.repository import Gtk as gtk | |
from gi.repository import AppIndicator3 as appindicator | |
APPINDICATOR_ID = 'myappindicator' | |
def main(): | |
indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.path.abspath('sample_icon.svg'), appindicator.IndicatorCategory.SYSTEM_SERVICES) | |
indicator.set_status(appindicator.IndicatorStatus.ACTIVE) |