Skip to content

Instantly share code, notes, and snippets.

View tpb1908's full-sized avatar

Theo Pearson-Bray tpb1908

View GitHub Profile
@tpb1908
tpb1908 / cmd.bash
Created May 26, 2020 17:09
Extract XMP sidecar files, preserving directory structure
rsync -a --prune-empty-dirs --include '*/' --include '*.xmp' --exclude '*' source dest
@tpb1908
tpb1908 / listener.py
Last active May 12, 2020 12:03
Listener for i3 IPC events
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import asyncio
from i3ipc.aio import Connection
from i3ipc import Event
def onWindowEvent(i3, e):
if e.ipc_data["container"]["urgent"]:
print("Urgent\n\n\n")
print(f"Data: {e.ipc_data}")
This file has been truncated, but you can view the full file.
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RegressionTest0 {
public static boolean debug = false;
@Test
@tpb1908
tpb1908 / downloader.py
Created February 4, 2020 19:41
MLP AVA Downloader
import os
import requests
from tqdm import tqdm
from multiprocessing.pool import ThreadPool
path = os.getcwd()
with open(os.path.join(path, "names.txt")) as f:
names = [line.rstrip() for line in f]
UUN Group
s1647760 1
s1766404 1
s1527764 1
s1650684 1
s1627728 1
s1526737 1
s1605821 1
s1784529 1
s1891676 1
# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.2;
# shadow-red = 0.0;
[global_config]
always_split_with_profile = True
enabled_plugins = InactivityWatch, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
title_inactive_bg_color = "#4C566A"
title_inactive_fg_color = "#D8DEE9"
title_receive_bg_color = "#8FBCBB"
title_receive_fg_color = "#2E3440"
title_transmit_bg_color = "#88C0D0"
title_transmit_fg_color = "#2E3440"
@tpb1908
tpb1908 / Xresources
Last active November 26, 2017 16:28
Xft.dpi: 200
rofi.show-icons: true
! rofi.fullscreen: true
rofi.terminal: terminator
rofi.font: SourceCodePro-Regular 18
rofi.color-enabled: true
! ------------------------------------------------------------------------------
! ROFI color theme
! ------------------------------------------------------------------------------
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true