Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo -e "\e[97mPlease enter password for Synapse/Matrix root user:\e[0m";
read -s password
echo -e "\e[97mEnter user you'd like to deactivate\e[0m";
read user
url_user=`echo -n "$user" | jq -s -R -r @uri`
json=`curl -s --insecure -XPOST -d '{"type":"m.login.password", "user":"root", "password":"'$password'"}' "https://localhost:8448/_matrix/client/r0/login"`
access_token=`echo "$json" | jq -r ".access_token"`
@pixline
pixline / imapsync.sh
Created June 28, 2013 04:24
IMAP to IMAP batch mailbox migration. Requires imapsync (http://imapsync.lamiral.info/)
#!/usr/bin/php
#
# Usage: ./imapsync.sh accounts.csv
#
# CSV account schema:
# old_username;old_password;new_username;new_password
#
<?php
define('HOST_FROM', 'imap.example.com');