Skip to content

Instantly share code, notes, and snippets.

Avatar

Abel Luck abeluck

View GitHub Profile
@abeluck
abeluck / forward-gpg-agent-to-gitpod.sh
Created Apr 11, 2022
A script for forwarding your gpg-agent to gitpod
View forward-gpg-agent-to-gitpod.sh
#!/bin/bash
set -euo pipefail
opt=${1:-}
usage() {
echo "$0 - ssh into a remote gitpod with your gpg-agent forwarded"
echo
echo "usage: $0 [option]"
echo
@abeluck
abeluck / build-emacs.sh
Created Jul 9, 2019
Build emacs from source on Debian 9 (stretch)
View build-emacs.sh
#!/bin/bash
# Builds emacs from source
# Tested on Debian 9 (stretch)
set -e
emacs_src=$HOME/src/emacs
emacs_dest=$HOME/.local
emacs_tag=emacs-26.2
@abeluck
abeluck / playbook.yml
Last active Apr 11, 2022
Ansible tasks to create and delete alertmanager silences
View playbook.yml
# creates a silence in alertmanager that starts `now` and lasts for 10 minutes
- hosts: localhost
gather_facts: yes
tasks:
- set_fact:
start_datetime: "{{ ''| local_time_iso8601 }}"
future_datetime: "{{ ''|local_time_iso8601 | add_time_iso8601(minutes=10) }}"
- debug:
var: future_datetime
@abeluck
abeluck / generate-signing-key.py
Last active Oct 11, 2021
Generate a synapse signing key from the command line
View generate-signing-key.py
# Generate a signing key for synapse from the command line
#
# Usage: python3 generate-signing-key.py
#
# You must have the signedjson package installed:
# apt install python3-signedjson
# pip3 install signedjson
#
# Author: Abel Luck <abel@guardianproject.info>
# Created: April 25 2019
@abeluck
abeluck / USAGE.md
Last active Feb 15, 2019
Ansible playbook for updating apt securely (CVE-2019-3462)
View USAGE.md

This only works on debian stretch (stable)

gpg --verify check-apt-update.sh.asc
ansible-playbook upgrade-apt.yml -i <YOURINV>

Thanks to @eighthave for original script.

Ref:

@abeluck
abeluck / verifying-debian-docker-images.md
Last active Feb 8, 2021
On the Subject of Verification of Provenance for Debian Docker Images
View verifying-debian-docker-images.md

On the Subject of Verification of Provenance for Debian Docker Images

note: this was last tested in 2019. things have probably changed.

Prepare

git clone https://github.com/debuerreotype/debuerreotype
cd debuerreotype
View gist:6e394cc969470945c0ec52c749e1486d
sending 57f56c83-7b4d-4fb4-b631-3f85a1cc787b +55555555555 test
GET https://textsecure-service-staging.whispersystems.org/v2/keys/+55555555555/1
GET https://textsecure-service-staging.whispersystems.org/v2/keys/+55555555555/1 200 Success
Trying to get session for identifier: +55555555555.1
Saving new identity...
Trying to get session for identifier: +55555555555.1
PUT https://textsecure-service-staging.whispersystems.org/v1/messages/+55555555555
PUT https://textsecure-service-staging.whispersystems.org/v1/messages/+55555555555 409 Error
{ successfulNumbers: [],
errors:
@abeluck
abeluck / SignalProtocolStore.js
Created Nov 1, 2018
SignalProtocolStore interface
View SignalProtocolStore.js
function SignalProtocolStore(path) {
}
SignalProtocolStore.prototype = {
Direction: {
SENDING: 1,
RECEIVING: 2,
},
// create a random group id that we haven't seen before.
View gist:7fd2552f433476db7545fffe72679b4a
defaults d-xmpp
log global
mode tcp
option redispatch
option tcplog
option tcpka
option clitcpka
option srvtcpka
timeout connect 5s
View keybase.md

Keybase proof

I hereby claim:

  • I am abeluck on github.
  • I am abelxluck (https://keybase.io/abelxluck) on keybase.
  • I have a public key ASAXHrXl-Z07odFRgipNht7jtPUi4CrF9jpo1wATItzxyQo

To claim this, I am signing this object: