How to make your desktop open different URLs in different browsers, depending on the URL
-
vim ~/bin/open-the-right-browser
#!/bin/sh case "$1" in *git.example.com*) browser=firefox;; *) browser=chromium-browser;; esac
exec
# Put this in your top-level conftest.py | |
class XTermProgress: | |
def __init__(self, stdout=sys.stdout): | |
self.init(stdout) | |
self.session = None | |
self.reported = set() | |
self.args = [] |
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet static | |
address X.X.X.X | |
pointopoint X.X.X.Y | |
netmask 255.255.255.255 | |
gateway X.X.X.Y | |
dns-nameservers A.B.C.D A.B.C.E A.B.C.F |
How to make your desktop open different URLs in different browsers, depending on the URL
vim ~/bin/open-the-right-browser
#!/bin/sh
case "$1" in
*git.example.com*) browser=firefox;;
*) browser=chromium-browser;;
esac
exec
#!/usr/bin/env python | |
""" | |
Compare PDF reports pixel-wise. | |
When reportgen functional tests fail, you may want to see visually what | |
exactly changed. To do that: | |
(1) set your changes aside, e.g. | |
git stash |
mg@platonas: /tmp/experiment $ tree | |
. | |
├── roles | |
│ └── common | |
│ └── tasks | |
│ ├── generate_confi1g.yml | |
│ ├── main.yml | |
│ └── sync_rules.yml | |
└── test.yml |
AccessControl: | |
setup.py says: 2.7, 3.5, 3.6, 3.7 | |
tox.ini says: 2.7, 3.5, 3.6, 3.7 | |
.travis.yml says: 2.7, 3.5, 3.6, 3.7 | |
appveyor.yml says: 2.7, 3.5, 3.6 | |
Acquisition: |
Traceback (most recent call last): | |
File "/home/mg/src/zodbbrowser/.tox/py37/lib/python3.7/site-packages/zope/configuration/config.py", line 817, in toargs | |
args[str(name)] = field.fromUnicode(s) | |
File "/home/mg/src/zodbbrowser/.tox/py37/lib/python3.7/site-packages/zope/configuration/fields.py", line 85, in fromUnicode | |
self._DOT_VALIDATOR.validate(to_validate) | |
File "/home/mg/src/zodbbrowser/.tox/py37/lib/python3.7/site-packages/zope/schema/_bootstrapfields.py", line 291, in validate | |
self._validate(value) | |
File "/home/mg/src/zodbbrowser/.tox/py37/lib/python3.7/site-packages/zope/schema/_field.py", line 670, in _validate | |
raise InvalidDottedName(value).with_field_and_value(self, value) | |
zope.schema.interfaces.InvalidDottedName: .systemerror.SystemErrorView |
Python 2.7.14 (default, Sep 23 2017, 22:06:14) | |
[GCC 7.2.0] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> class Wat(object): | |
... __slots__ = ('a', 'b') | |
... a = 42 | |
... | |
>>> x = Wat() |
- name: install letsencrypt | |
pip: | |
name: "{{ item }}" | |
virtualenv: /opt/letsencrypt | |
state: "{{ 'present' if ansible_check_mode else 'latest' }}" | |
extra_args: >- | |
{% if 'pip' not in item and not ansible_check_mode -%} | |
--upgrade-strategy=eager | |
{%- endif %} | |
with_items: |
mg@platonas: ~ $ docker run --rm -it ubuntu:xenial | |
root@c197c14c8a8d:/# apt update -qq && apt install -qqy virtualenv git python | |
30 packages can be upgraded. Run 'apt list --upgradable' to see them. | |
The following additional packages will be installed: | |
ca-certificates dh-python file git-man ifupdown iproute2 isc-dhcp-client isc-dhcp-common krb5-locales less libasn1-8-heimdal libatm1 | |
libbsd0 libcurl3-gnutls libdns-export162 libedit2 liberror-perl libexpat1 libffi6 libgdbm3 libgmp10 libgnutls30 libgssapi-krb5-2 | |
libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libidn11 | |
libisc-export160 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libmagic1 libmnl0 libmpdec2 | |
libnettle6 libp11-kit0 libperl5.22 libpopt0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib | |
libpython3.5-minimal libpython3.5-stdlib libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3 |