Skip to content

Instantly share code, notes, and snippets.

Abel Luck abeluck

Block or report user

Report or block abeluck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 Jul 8, 2019
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
Created Apr 25, 2019
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, pip3 install signedjson
# You must use python3
#
# Author: Abel Luck <abel@guardianproject.info>
# Updated: 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 Jan 14, 2019
On the Subject of Verification of Provence for Debian Docker Images
View verifying-debian-docker-images.md

On the Subject of Verification of Provence for Debian Docker Images

Prepare

git clone https://github.com/debuerreotype/debuerreotype
cd debuerreotype

Check

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:

@abeluck
abeluck / gist:6243306
Last active Oct 15, 2018
Local HTTP server to stream an InputStream to MediaPlayer on Android
View gist:6243306
/**
* This is simple HTTP local server for streaming InputStream to apps which are capable to read data from url.
* Random access input stream is optionally supported, depending if file can be opened in this mode.
*
* from: http://stackoverflow.com/a/9096241
*/
public class StreamOverHttp{
private static final boolean debug = false;
private final Browser.FileEntry file;
You can’t perform that action at this time.