Skip to content

Instantly share code, notes, and snippets.

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
@jmccrohan
jmccrohan / gist:957801
Created May 5, 2011 20:05
Simple fan + led control for DNS-323 rev C1 running Debian Squeeze.
We couldn’t find that file to show.
@jmccrohan
jmccrohan / gist:959591
Created May 6, 2011 19:16
CC128 pachube bash
#!/bin/bash
# variables
pachube_api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
pachube_feed="12345"
stty -F /dev/ttyS0 57600
touch /tmp/cc128
while [ 1 ]
do
@jmccrohan
jmccrohan / gist:980837
Created May 19, 2011 14:17
OpenWrt BT Voyager 2110
CFE version 1.0.37-6.8.5CFE version 1.0.37-6.8.5 for BCM96348 (32bit,SP,BE)
Build Date: Tue Jan 2 19:44:45 CST 2007 (michaelc)
Boot Address 0xbfc00000
Flash Config: CS0(1fc00009,1f),Base(bfc00000),Size(4MB)
Ethernet Switch Mode 00000000
found@block 8
Board IP address : 192.168.1.1
Index: target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch
===================================================================
--- target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch (revision 0)
+++ target/linux/brcm63xx/patches-2.6.37/980-board_BTV2110.patch (revision 0)
@@ -0,0 +1,73 @@
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -444,6 +444,62 @@ static struct board_info __initdata boar
+ },
+ };
@jmccrohan
jmccrohan / EtherShield_ntp.pde
Created November 5, 2011 17:58
Nanode NTP Test/Demo
/*
* Arduino ENC28J60 Ethernet shield NTP client
* With extra bits for nanode
*/
#define NANODE
#define DEBUG
// uses RTClib from Jeelabs to provide DateTime functions
// http://cafe.jeelabs.net/software/#index3h1
static float floatvar = 12345.67;
static char sprintfbuffer[15];
static char dtostrfbuffer[15];
void setup() {
sprintf(sprintfbuffer,"%f", floatvar);
dtostrf(floatvar,8, 2, dtostrfbuffer);
Serial.begin(9600);
Serial.print("sprintf: ");
jmccrohan@lambda:~$ pyrit benchmark
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+
Running benchmark (24345.1 PMKs/s)... -
Computed 24345.13 PMKs/s total.
#1: 'OpenCL-Device 'Juniper'': 23073.1 PMKs/s (RTT 2.8)
#2: 'CPU-Core (SSE2)': 808.9 PMKs/s (RTT 3.0)
#3: 'CPU-Core (SSE2)': 807.6 PMKs/s (RTT 3.0)
static float floatvar = 12345.67;
static char sprintfbuffer[2];
static char dtostrfbuffer1[2];
static char dtostrfbuffer2[2];
void setup() {
sprintf(sprintfbuffer,"%f", floatvar);
dtostrf(floatvar,8, 2, dtostrfbuffer1);
dtostrf(floatvar,8, 2, dtostrfbuffer2);
@jmccrohan
jmccrohan / hardcode_6channel_audio.patch
Created May 27, 2012 20:21
Wine 1.3.25+ 5.1 Surround
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -1372,7 +1372,7 @@ static HRESULT WINAPI AudioClient_IsForm
goto exit;
}
if(max > 8)
- max = 2;
+ max = 6;
if(fmt->nChannels > max){
hr = S_FALSE;