View -Readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------- | |
// Description page for these Ubiquity commands: http://www.endolith.com/ubiquity_commands.html | |
// ----------------------------------------------------------------- | |
// 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 http://www.jslint.com/ : | |
/*global CmdUtils, Utils, context, displayMessage, noun_arb_text, noun_type_url, _*/ |
View Readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
http://gist.github.com/gists/71580 | |
and then include them from another site? | |
http://www.endolith.com/ubiquity_commands.html |
View Readme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match. | |
Instructions: | |
1. Set your Gnome theme as you would like it | |
2. Run with a command like "python wine_colors_from_gtk.py" | |
3. Restart any apps running in Wine. They should match the Gnome theme colors now. | |
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/ | |
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper |
View LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2008 endolith@gmail.com | |
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: |
View commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I hate the command line. | |
# I use fish as my default shell http://www.fishshell.org/ | |
# 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' |
View template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is a template command. */ | |
CmdUtils.CreateCommand({ | |
names: ["example"], | |
icon: "http://www.mozilla.com/favicon.ico", | |
description: "A short description of your command.", | |
help: "How to use your command.", | |
author: {name: "Your Name", email: "you@mozilla.com"}, | |
license: "GPL", | |
homepage: "http://labs.mozilla.com/", | |
arguments: [{role: 'object', nountype: noun_arb_text}], |
View mouse_movement_tester.pde
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Processing sketch to show your mouse's movement | |
// Linux's mouse acceleration really sucks. | |
void setup() { | |
size(800, 800); | |
background(0); | |
} | |
void draw(){ | |
if (mousePressed == true) { |
View fusc.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
else: |
View gcd_and_lcm.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Examples | |
-------- |
View Mac OS X jyProcessing.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This file was generated by the Jython installer | |
# Created on Mon May 19 20:25:40 CEST 2008 by me | |
CP="/Users/me/jython2.2.1/jython.jar:/Applications/Processing/lib/core.jar" | |
if [ ! -z "$CLASSPATH" ] | |
then | |
CP=$CP:$CLASSPATH | |
fi |
OlderNewer