All of the following information is based on go version go1.17.1 darwin/amd64.
| GOOS | Out of the Box |
|---|---|
aix |
✅ |
android |
✅ |
| This Scripts and Config Snippets are for a little Symbol in the Waybar. If you Click on the Tunnelsymbol the OpenVPN-Client | |
| establish a Connection to the given Config (Systemd Openvpn-Client). If you do not Need the Tunnel then you can Click again on | |
| the Symbol and the VPN-Tunnel gets closed. The following moving Parts are needed: | |
| 1. The Waybar Config Snippit | |
| 2. The Toggle/Status Script | |
| 3. The Polkit Rule to allow the control of the OpenVPN-Client systemd-Unit by given user (a sudo nopasswd is also possible but | |
| not so granular and allows systemctl completly) |
This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.
First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:
Our goal here is to have one USB stick to rule them all. Objectives:
The last bullet is subject to interpretation, but I'm defining functional as:
| ## {{{ http://code.activestate.com/recipes/491264/ (r4) | |
| import socket | |
| class DNSQuery: | |
| def __init__(self, data): | |
| self.data=data | |
| self.dominio='' | |
| tipo = (ord(data[2]) >> 3) & 15 # Opcode bits | |
| if tipo == 0: # Standard query |
| import BaseHTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import sys | |
| import base64 | |
| key = "" | |
| class AuthHandler(SimpleHTTPRequestHandler): | |
| ''' Main class to present webpages and authentication. ''' | |
| def do_HEAD(self): |
| There are many already existing powerful http servers that can be used in python e.g. gevent, twisted web server. However, they are a bit complex to use and you cannot start them in a thread other than the main thread. | |
| Here is a sample of basic http server using "BaseHTTPRequestHandler". The example exposed two rest interfaces: | |
| To ingest records into the web server | |
| To retrieve already ingested records from the web server | |
| The records are assumed to be JSON based, however, any type of records can be ingested. | |
| [sourcecode language="python" wraplines="false" collapse="false"] | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer |
| /** | |
| * USB HID Keyboard scan codes as per USB spec 1.11 | |
| * plus some additional codes | |
| * | |
| * Created by MightyPork, 2016 | |
| * Public domain | |
| * | |
| * Adapted from: | |
| * https://source.android.com/devices/input/keyboard-devices.html | |
| */ |
| -- Turkce isimler sozlugu twitter : http://twitter.com/tserpico | |
| CREATE TABLE `isimler` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `isimler` varchar(255) DEFAULT NULL, | |
| `cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U', | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB; | |
| -- ---------------------------- |