Skip to content

Instantly share code, notes, and snippets.

View jonasbits's full-sized avatar

Jonas Anton Östman jonasbits

View GitHub Profile
@Zash
Zash / dnsupdate-policy.lua
Created January 23, 2022 10:55
PowerDNS DNSUPDATE policy script
-- Policy control thing with policy derived from key name
-- "keyname.owner.domain" will be allowed to edit domain (including suddomains)
-- Special keyname "acme" should be allowed to add and remove _acme-challenge TXT records under domain
-- Assumes that the key name can't be faked
function updatepolicy(request)
local tsig = request:getTsigName();
local zone = request:getZoneName();
pdnslog("updatepolicy: tsig "..tsig:toString().." wants to update "..request:getQName():toString().." in "..zone:toString(), pdns.loglevels.Info);
@blackknight36
blackknight36 / twitch_irc.md
Created April 11, 2020 18:36 — forked from hunterbridges/twitch_irc.md
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";
@jonasbits
jonasbits / dnsseeder.json
Last active December 12, 2019 15:01
dnsseeder.json with values for namecoin
{
"Name": "Namecoin",
"Desc": "Description of Namecoin",
"ID": "0xfeb4bef9",
"Port": 8334,
"Pver": 70001,
"TTL": 600,
"InitialIP": "127.0.0.1",
"DNSName": "dnsseed.nmctest.net",
"Seeder1": "nmc.seed.quisquis.de",
@hyarion
hyarion / frama-c+why3.1.1.0.log
Created December 11, 2018 23:34
[WIP] Frama-C 18.0 (Argon) + Why3 1.1.0
hyarion$ frama-c -wp -wp-prover=cvc4,z3-ce isqrt.c
[kernel] Parsing isqrt.c (with preprocessing)
[wp] Warning: Missing RTE guards
[wp] 61 goals scheduled
[wp] Proved goals: 61 / 61
Qed: 41 (0.30ms-14ms-56ms)
cvc4: 2 (140ms)
z3-ce: 19 (30ms-221ms-1.8s)
hyarion$ why3 --version
Why3 platform, version 1.1.0
@F21
F21 / signing-gpg-keys.md
Last active April 17, 2024 14:37
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@denolfe
denolfe / pixelbook-linux-setup.md
Last active August 19, 2022 21:19
Notes on setting up Pixelbook with Linux apps

Pixelbook Linux Setup

Chromebook Configuration

  • Enable Linux Apps
    • Open drawer in bottom right and click gear icon
    • Scroll down to find Linux Apps or Linux (Beta) and select TURN ON
    • After the install runs, you should have an application in ChromeOS called Terminal

Initial setup of container

@stefanocoding
stefanocoding / huawei_e397b.md
Created February 24, 2018 03:43
Make modem Huawei E397B work on Mac OS X
  1. Install the Connection Manager that is launched when you connect the modem to the Mac
  2. Download the source of usb_modeswitch from here http://www.draisberghof.de/usb_modeswitch/ (at the moment of writing this the file appears with the name usb-modeswitch-2.5.2.tar.bz2)
  3. Run make in the directory of the source you downloaded
  4. Run sudo ./usb_modeswitch -v12d1 -p1505 -X in the same directory

If the last step returns an error (I don't remember the error now, but I was getting an error related to usb_modeswitch not being able to take control of the modem to perfom changes):

  1. Unplug the modem and plug it again
  2. As soon as you plug the modem again, run sudo ./usb_modeswitch -v12d1 -p1505 -X repatedly until you get a successful result
  3. Open Connection Manager and your modem is going to be detected
@ntd
ntd / libserialport example.c
Last active October 16, 2019 15:13 — forked from Nixes/libserialport example.c
libserialport example
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <unistd.h> // for sleep function
#include <libserialport.h> // cross platform serial port lib
//#include "protocol.h"
const char* desired_port = "COM8";
@KrazyIvan-
KrazyIvan- / OpenWrt detect new device and send text message.md
Created November 21, 2017 02:43 — forked from jwalanta/OpenWrt detect new device and send text message.md
Detect new network devices connecting to OpenWrt and send text message
@ryancdotorg
ryancdotorg / rotate_dkim.py
Last active October 27, 2023 15:22
Experimental DKIM rotate/revoke/repudiate script for Exim+Route53. I take no responsibility for its use.
#!/usr/bin/env python
import os
import grp
import sys
import stat
import time
import hmac
import boto3
import tempfile