$ echo '[email protected]' | base64
bWVAZXhhbXBsZS5jb20=
$ echo 'secret' | base64
c2VjcmV0
from kazoo.client import KazooClient | |
from kazoo.recipe.cache import TreeCache | |
zuul_root = "/path/to/src/opendev/zuul/zuul" | |
k = KazooClient( | |
hosts="localhost:2281", | |
keyfile=f"{zuul_root}/tools/ca/keys/clientkey.pem", | |
certfile=f"{zuul_root}/tools/ca/certs/client.pem", | |
ca=f"{zuul_root}/tools/ca/certs/cacert.pem", |
# /etc/systemd/network/98-wireguard.network | |
[Match] | |
Name = wg0 | |
[Network] | |
Address = 10.200.200.1/32 | |
[Route] | |
Gateway = 10.200.200.1 | |
Destination = 10.200.200.0/24 |
# Issue: https://github.com/pika/pika/issues/753 | |
import logging | |
import pika | |
class Consumer: | |
def run(self, queue): | |
self.connection = connection = pika.BlockingConnection() |
class assert_raises(object): | |
def __init__(self, exc_type): | |
self.exc_type = exc_type | |
def __enter__(self): | |
pass | |
def __exit__(self, exc_type, exc_value, traceback): | |
assert self.exc_type == exc_type, "Expected exception not raised" |
import time | |
import signal | |
class SignalBlocker: | |
def __init__(self, signal): | |
self._signal = signal | |
self._signal_blocked = False |
epfd = epoll_create(1); | |
if (epfd == -1) | |
errExit("epoll_create"); | |
ev.events = EPOLLIN; | |
ev.data.fd = sockfd; | |
epoll_ctl(epfd, EPOLL_CTL_ADD, sockfd, &ev); | |
ev.events = EPOLLIN; | |
ev.data.fd = STDIN_FILENO; |
# Evaluate prompt | |
setopt prompt_subst | |
# History config | |
HISTFILE=~/.histfile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
# VIM key bindings | |
bindkey -v | |
# Key bindings for 'home' and 'end' | |
bindkey "^[[1~" beginning-of-line |
$ echo '[email protected]' | base64
bWVAZXhhbXBsZS5jb20=
$ echo 'secret' | base64
c2VjcmV0
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<title>{% block title %}{% endblock %}</title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="{{ MEDIA_URL }}style/screen.css"> | |
</head> | |
<body> |
#!/usr/bin/env python | |
import gevent | |
from gevent import monkey, GreenletExit | |
monkey.patch_all() | |
import sys | |
import urllib2 | |
from datetime import datetime, date, time | |
from BeautifulSoup import BeautifulSoup |