Skip to content

Instantly share code, notes, and snippets.

@sinclairtarget
sinclairtarget / 1-cat-pdp7.s
Last active April 2, 2024 20:15
cat through the ages
" cat
lac 017777 i " Load accumulator (AC) with argument count
sad d4 " Skip next if we have more than 4 words of args
jmp nofiles " Otherwise, jump to nofiles
lac 017777 " Load AC with address of args
tad d1 " Increment AC by 1, past argument count
tad d4 " Increment AC by 4, now AC points to first real arg
dac name " Save arg pointer from AC into 'name'
@F21
F21 / signing-gpg-keys.md
Last active May 5, 2024 20:59
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.
@MawKKe
MawKKe / cryptsetup-with-luks2-and-integrity-demo.sh
Last active June 7, 2024 17:18
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) ekkwam@gmail.com
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
@shuLhan
shuLhan / playbook.py
Created October 2, 2016 07:48
Sphinx directive to parse and include Ansible playbook
##
## Directive for Ansible playbook.
##
## This directive will parse all the top comment on playbook and use it as
## content in documentation, and display the rest of it as a script.
##
## Installation,
## - copy the script to your sphinx `doc` directory
## - enable local extension in `conf.py`
##
@MawKKe
MawKKe / jolla-sms.sql
Created February 16, 2016 17:27
Query Jolla's commhistory.db for SMS's
/*
jolla-sms.sql - Query Jolla's commhistory.db for SMS's.
- Shows sent/received from last 2 months, oldest to newest.
- Messages are printed with newlines replaced by spaces.
---
Usage:
@MawKKe
MawKKe / smsread.py
Last active June 6, 2020 23:37
Python CLI program to show (unread) SMS's on Jolla/Sailfish OS
#!/usr/bin/env python3
#
# Author: Markus (MawKKe) ekkwam@gmail.com | 2016-01-27 02:52
#
# ---
# CLI program to show (unread) SMS's on Jolla/Sailfish OS
#
# Reads directly form an sqlite3 database, so standard Python libraries suffice.
#
# The database file is typically located in ~/.local/share/commhistory/commhistory.db
@bnagy
bnagy / gpgmutt.md
Last active March 30, 2024 07:52
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@torgeir
torgeir / minimal-maven-pom.xml
Last active February 17, 2024 00:08
A minimal maven pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gd.wa</groupId>
<artifactId>minimal-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!