Skip to content

Instantly share code, notes, and snippets.

View endolith's full-sized avatar


View GitHub Profile
endolith / -Readme.txt
Created February 27, 2009 17:22
Ubiquity commands
// -----------------------------------------------------------------
// Description page for these Ubiquity commands:
// -----------------------------------------------------------------
// I guess only one link rel="commands" works per page, so for now, at least, all commands are in one gist, separated into files based on subject.
// Some of these ain't workin since 0.5. Need to fix them.
// For :
/*global CmdUtils, Utils, context, displayMessage, noun_arb_text, noun_type_url, _*/
endolith / Readme.txt
Created March 4, 2009 21:28
This is a gist experiment
I'm not really sure how to work with this site or divide up gists yet...
Only one link rel="commands" works per page, so for now, at least, I need to keep them all in one gist:
and then include them from another site?
endolith / Readme.txt
Last active September 23, 2023 11:04
Gnome to Wine color scraper
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
1. Set your Gnome theme as you would like it
2. Run with a command like "python"
3. Restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here:
This is also stored on
endolith / LICENSE.txt
Last active March 22, 2018 21:05
Microsoft .URL file launcher
MIT License
Copyright (c) 2008
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
endolith /
Created March 13, 2009 14:17
fish bash cheatsheet
# I hate the command line.
# I use fish as my default shell
# List disk usage of each subdirectory
du -s --si *
# Access one computer from the other, regardless of whether Internet is down, Dynamic DNS is down, Wireless is down, or computer is outside of LAN
# Tomato assigns different hostnames to different MAC addresses, regardless of which computer it is, so I have a separate _wired hostname
function desktop --description 'Connect to desktop machine through SSH'
endolith / template.js
Created March 25, 2009 20:09
Ubiquity template
/* This is a template command. */
names: ["example"],
icon: "",
description: "A short description of your command.",
help: "How to use your command.",
author: {name: "Your Name", email: ""},
license: "GPL",
homepage: "",
arguments: [{role: 'object', nountype: noun_arb_text}],
endolith / mouse_movement_tester.pde
Created May 16, 2009 23:02
Processing sketch to show your mouse's movement
// Processing sketch to show your mouse's movement
// Linux's mouse acceleration really sucks.
void setup() {
size(800, 800);
void draw(){
if (mousePressed == true) {
endolith /
Created May 18, 2009 04:05
Python function for generating the nth number of Stern's diatomic series recursively
def fusc(n):
"""Return the nth number of Stern's diatomic series recursively"""
if n == 0 or n == 1:
return n
elif n > 0 and n % 2 == 0: # even
return fusc(n // 2)
elif n > 0 and n % 2 == 1: # odd
return fusc((n - 1) // 2) + fusc((n + 1) // 2)
endolith /
Last active June 22, 2022 23:33
GCD and LCM functions in Python for several numbers
# Greatest common divisor of 1 or more numbers.
from functools import reduce
def gcd(*numbers):
Return the greatest common divisor of 1 or more integers
endolith / Mac OS X
Created May 23, 2009 03:40
Python Processing using Jython in Ubuntu
# This file was generated by the Jython installer
# Created on Mon May 19 20:25:40 CEST 2008 by me
if [ ! -z "$CLASSPATH" ]