Skip to content

Instantly share code, notes, and snippets.

View jasonwhite's full-sized avatar

Jason White jasonwhite

  • Greater Seattle Area
View GitHub Profile
@jasonwhite
jasonwhite / desktopogra.py
Created November 11, 2014 06:38
Downloads all wallpapers from the Desktopography exhibitions.
#!/usr/bin/python3
"""
Desktopography provides no way of downloading all of their wallpapers at once.
This script will scrape the Desktopography website and download all of the
wallpapers for the specified resolutions and years. Wallpapers that have already
been downloaded are skipped.
Usage: ./desktopogra.py [DIR]
The wallpapers are saved in the following format:
@jasonwhite
jasonwhite / filemonitor.c
Created November 13, 2014 01:54
Windows file monitoring implemented in C and D.
/*
* This is a short test program that prints a message when a file is added,
* removed, modified, or moved from any directory below that of the program's
* working directory.
*/
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <tchar.h>
#include <stdint.h>
@jasonwhite
jasonwhite / syscalls.json
Created June 4, 2020 17:35
x64 syscalls
[
{
"num": 0,
"name": "sys_read",
"params": [
[
"unsigned int",
"fd"
],
[
#!/usr/bin/env python3
"""
Uses the Reddit API to get the top wallpaper from a specified subreddit.
"""
import urllib.request
import json
import subprocess
import shutil
@jasonwhite
jasonwhite / stremio.nix
Created May 10, 2020 22:20
NixOS build for Stremio
{
pkgs ? import <nixpkgs> {},
}:
with pkgs;
with builtins;
let
serverJS = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/stremio-artifacts/four/master/server.js";
@jasonwhite
jasonwhite / joystick.c
Last active May 3, 2024 13:28
Reads joystick/gamepad events on Linux and displays them.
/**
* Author: Jason White
*
* Description:
* Reads joystick/gamepad events and displays them.
*
* Compile:
* gcc joystick.c -o joystick
*
* Run:
@jasonwhite
jasonwhite / pulsetest.cc
Last active June 4, 2024 11:24
A simple PulseAudio test program for monitoring volume changes on the default sound sink.
/**
* Author: Jason White
* License: Public Domain
*
* Description:
* This is a simple test program to hook into PulseAudio volume change
* notifications. It was created for the possibility of having an automatically
* updating volume widget in a tiling window manager status bar.
*
* Compiling: