Skip to content

Instantly share code, notes, and snippets.

Avatar
Decentralising all the way

Brendan Abolivier babolivier

Decentralising all the way
View GitHub Profile
View synapse_ubucon_workshop.md

Step 0: SSH into the server

You will be provided with a domain name looking like xxxxx.ubucon.abolivier.bzh, which points to your dedicated VPS. To access the server's command line, run ssh ubuntu@xxxxx.ubucon.abolivier.bzh from a terminal (or connect with your favourite SSH client with the user ubuntu), and use the password ubucon2019.

Step 1: Install the Matrix.org repository

wget -qO - https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg | sudo apt-key add -
sudo add-apt-repository "deb https://packages.matrix.org/debian/ bionic main"
View check_homeservers_versions_in_room.sh
#!/bin/bash
# Init.
if [ "$1" == "--silent-fail" ]; then
SILENT_FAIL=true
else
SILENT_FAIL=false
fi
ACCESS_TOKEN="[REDACTED]"
@babolivier
babolivier / backup.sh
Last active Oct 8, 2018
Script run as a cron task that launch backups creation and upload created backups to an OpenStack Swift container, after having deleted every backup older than a week old. Place the scripts creating backups in /etc/backup. If you want the backups directory to be cleaned first, create a script named like "00_clean.sh" that does that.
View backup.sh
#!/bin/bash -e
# Log in error log
1>&2 echo "--- `date -Is` ---"
# Log in output log
echo "--- `date -Is` ---"
if [ "$#" != "1" ]; then
1>&2 echo "Usage: backup.sh HOST_NAME"
exit 1
View matrix-inviter.go
package main
import (
"fmt"
"strings"
"github.com/matrix-org/gomatrix"
)
func main() {
@babolivier
babolivier / install-riot.sh
Created Jul 11, 2018
Script to quickly install the desired version of Riot.im
View install-riot.sh
#!/bin/bash -e
# VARIABLES
HTTP_USER="http"
RIOT_REPO="https://github.com/vector-im/riot-web"
WEB_ROOT="/srv/http"
# PERMISSIONS CHECK
sudo -u $HTTP_USER whoami 2>&1 > /dev/null
if [ $? != 0 ]; then
View cozy-disable-2fa.js
var cozydb = require("cozydb");
var data = cozydb.getModel('User', {
authType: String
})
update = function(id) {
data.updateAttributes(id, {
authType: null
}, function(err) {
View isen-trombino-poc.coffee
#!/usr/bin/env coffee
#################################################################################
# This is a proof of concept to demonstrate the lack of security of ISEN Brest's#
# who's who (trombinoscope). In order to have it running stand-alone, just copy-#
# paste this file, cd to the paste's directory, install node.js, npm, then run: #
# # npm install -g coffee-script #
# $ npm install request cheerio async express printit #
# Then, all you have to do is to run #
# coffee ./[FILE_NAME] #
View cozy-addData.js
var cozydb = require("cozydb");
var data = cozydb.getModel('User', {})
update = function(id) {
data.updateAttributes(id, {
otpKey: "7lmt5npm7p",
hotpCounter: 0,
authType: "hotp"
}, function(err) {
View gist:c49ffe2ddd955749fe03
### Keybase proof
I hereby claim:
* I am babolivier on github.
* I am brenabolivier (https://keybase.io/brenabolivier) on keybase.
* I have a public key whose fingerprint is E1D4 B745 7A82 9D77 1FBA 8CAC E860 1572 74A2 8D7E
To claim this, I am signing this object: