Skip to content

Instantly share code, notes, and snippets.

View troyp's full-sized avatar

Troy Pracy troyp

  • Lismore, NSW, Australia
View GitHub Profile
CC=gcc
CFLAGS=-Wall -O2 `pkg-config --cflags x11`
LDFLAGS=`pkg-config --libs x11`
SOURCES=toggle-decorations.c
EXECUTABLE=$(patsubst %.c,%,$(SOURCES))
all: $(EXECUTABLE)
clean: $(EXECUTABLE)
@troyp
troyp / ImgurAlbum.sh
Created July 22, 2021 20:08 — forked from Skylark95/ImgurAlbum.sh
Bash script to download images for an Imgur album
#!/bin/bash
#
# ImgurAlbum.sh
#
# Bash script to download images for an Imgur album
#
if [ -z "$1" ]; then
echo "ImgurAlbum: missing Album ID"
echo "Usage: ImgurAlbum [Album ID]"
exit
@troyp
troyp / global-input-unstable-v1.xml
Created July 20, 2021 01:35
global-input wayland protocol DRAFT PREVIEW
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="global_input_v1">
<copyright>
Copyright (C) 2017 Greg V (greg@unrelenting.technology)
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
@troyp
troyp / redir.md
Created May 8, 2021 06:29 — forked from romainl/redir.md
Redirect the output of a Vim or external command into a scratch buffer

Redirect the output of a Vim or external command into a scratch buffer

Usage (any shell)

Show full output of command :hi in scratch window:

:Redir hi

Show full output of command :!ls -al in scratch window:

// ==UserScript==
// @name word highlight
// @namespace http://ss-o.net/
// @description keywords highlight for Google Search and All
// @include http://*
// @include https://*
// ==/UserScript==
// スクロール中のみハイライトするように変えた。
//console.time("highlight");
(function word_hightlight(loaded){
@troyp
troyp / monad-reader-contents.md
Last active July 25, 2020 04:07
The Monad.Reader contents

The Monad.Reader Issue 1 (March 1, 2005)

  • Pseudocode: Natural Style by Andrew J. Bromage
  • Pugs Apocryphon 1 – Overview of the Pugs project by Autrijus Tang
  • An Introduction to Gtk2Hs, a Haskell GUI Library by Kenneth Hoste
  • Implementing Web-Services with the HAIFA Framework by Simon D. Foster
  • Code Probe – Issue one: Haskell XML-RPC, v.2004-06-17 by Sven Moritz Hallberg

The Monad.Reader Issue 2 (May 2005)

@troyp
troyp / pkkolos-urxvt-scripts-README.md
Created March 31, 2020 16:07
Copy of pkkolos/urxvt-scripts (which consists only of a README.md)

urxvt-scripts

A small collection of perl extensions for the rxvt-unicode terminal emulator.

Installation

@troyp
troyp / jono.csv
Last active August 16, 2019 02:06
manga onomatopeia
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 3. in line 1.
kana,equivalent,meaning,examples
ウキ,kee;screech,monkey cry
ウン,groan;mmm;hmmm,groaning sound,One Piece ch788p16
が,chatter,background voices
ガガ,bam bam;pow pow;rattattat,sound of multiple closely-spaced impacts or explosions,One Piece ch788p12
ガギ,clang,clanging,One Piece ch788p13
カツン,clomp,sound of (esp. heavy) footfalls,One Piece ch788p13
ギャ,eek!,shriek (often girlish)
ギャアー,aargh!,screaming;extreme shock;terror,One Piece ch779 (vol78p70)
キラキラ,sparkle;twinkle,twinkling of a star;sparkle of jewellery;sparkling with excitement
@troyp
troyp / xreadkeys.c
Created January 18, 2018 01:03 — forked from javiercantero/xreadkeys.c
A X11/Xlib program that reads the KeyPress and KeyRelease events from the window and prints them to the standard output. Used to debug the keyboard within X.
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
Display *display;
Window window;
XEvent event;
int s;
@troyp
troyp / colours.sh
Created November 12, 2017 21:21
Display colours used for different file types
#!/bin/bash
# Script to show the colours used for different file types
# Taken from https://github.com/gkotian/gautam_linux/blob/master/scripts/colours.sh
# This is just a more readable version of the 'eval' code at:
# http://askubuntu.com/a/17300/309899
# A nice description of the colour codes is here: