Skip to content

Instantly share code, notes, and snippets.

View yamatt's full-sized avatar

Matt Copperwaite yamatt

View GitHub Profile
@yamatt
yamatt / README.md
Created January 15, 2021 13:31
Running Duplicity under Gnome Wayland and Systemd

Setup

Install duplicity and gnupg2

GnuPGP public keys

Configure yourself a GPG key to encrypt the data with. Note the key ID/hash to use in the duplicity-backup.service.

Remember to backup your private key separately so it is not lost when you need your backups, and so you can recover your files.

Object Storage Provider

Create yourself a place to put your backups

@yamatt
yamatt / README.md
Last active January 5, 2020 16:24
WIP CI/CD Stages Starting Point

This is a list of stages that I look to use in my integration pipelines for any project. This is a starting point for me, to remind me when starting a new project as to what to look to include. They are in rough order, starting from ones that are likely to be caught first to ones that are to be more complex to catch.

As is always the way with technology these stages do not have to be used exactly as directed here. They are a starting point so as not to overlook anything when starting a new project, and save me from doing a load of digging through old repositories.

I also find that considering these as early as possible means that you will have a better end product. So it's best to ensure you try to include as many as possible, but also not to put too much effort in to them.

This is still a work in progress and therefore incomplete.

@yamatt
yamatt / split.css
Last active September 25, 2021 14:11 — forked from jpnelson/split.css
Responsive, resizable panel layout with flexbox JUST CSS
* {
box-sizing: border-box;
}
html, body {
height: 100%;
padding: 0;
margin: 0;
}
@yamatt
yamatt / example.sh
Last active December 24, 2016 13:12
Running Android emulator from command line
$ apt-get install openjdk-8-jre
$ wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
$ tar xvf android-sdk_r24.4.1-linux.tgz
$ cd android-sdk-linux/
$ tools/android list sdk --all --extended
$ tools/android update sdk --all --no-ui --filter sys-img-x86_64-android-22,platform-tools,android-22,sysimg-22 # android 5.0.1
$ tools/android list targets
$ tools/android create avd --name test --target 1 --abi default/x86_64
$ tools/android avd -list-avd # these bits don't work. Need tidying up. Trying to list available avds that you just created
$ tools/android avd -u -list-avd
@yamatt
yamatt / README.md
Last active July 17, 2023 22:16
A list of regex to detect clickbait headlines.
@yamatt
yamatt / README.md
Last active June 19, 2016 17:16
Randomly assign yourself a new MAC at every boot for SystemD/Fedora3
  1. Place the random-mac.service file in to /etc/systemd/system

  2. Update the file so that wifidevicename is your WiFi device name, such as wlan0 or wlp1s0

  3. Give it permissions:

     chmod 644
     chown root:root
    
  4. Finally run:

@yamatt
yamatt / deluge-status.py
Last active April 21, 2016 15:29
Get details out of Deluge using the RPC API
# A really hacked down version of http://dev.deluge-torrent.org/wiki/Development/1.3/UIClient
# Writen to hook in to a different, syncro, script
from deluge.ui.client import client
import json
# Import reactor for our mainloop
from twisted.internet import reactor
d = client.connect()
@yamatt
yamatt / dedupe.py
Created June 30, 2015 10:56
Use this code to find duplicate files in a directory (GPLv3+)
#!/usr/bin/env python
import os
import hashlib
import collections
import argparse
class File(object):
def __init__(self, filepath):
self.filepath = filepath
@yamatt
yamatt / INSTALL
Created May 2, 2015 19:14
Twitter Streaming Example
pip install requests requests_oauthlib
@yamatt
yamatt / keybase.md
Created September 30, 2014 08:28
keybase.md

Keybase proof

I hereby claim:

  • I am yaMatt on github.
  • I am mattcopp (https://keybase.io/mattcopp) on keybase.
  • I have a public key whose fingerprint is C9E9 4F43 3DBD 175E 0D8E B63C 9689 9D4A 56E8 D4BD

To claim this, I am signing this object: