Skip to content

Instantly share code, notes, and snippets.

=== modified file 'gwibber/gwui.py'
--- gwibber/gwui.py 2010-02-28 20:11:47 +0000
+++ gwibber/gwui.py 2010-03-11 22:42:11 +0000
@@ -190,10 +190,14 @@
for search in self.streams.get_records(COUCH_TYPE_SEARCH, True):
search = search.value
sId = search["_id"]
+
+ view = self.messages.execute_view("transient_time", "messages")[[sId, {}]:[sId, 0]]
+ view.search_query = search["query"]
#!/usr/bin/env python
import gtk, webkit, webbrowser
gtk.gdk.threads_init()
html = """
<html>
<head>
<style>
#!/usr/bin/env python
import gtk, webkit
gtk.gdk.threads_init()
window = gtk.Window()
window.connect("destroy", gtk.main_quit)
window.resize(800, 500)
@segphault
segphault / gtkrc
Created March 4, 2010 05:38
My modified version of the Sonar Gtk+ theme
# Sonar
# default openSUSE 11.2 theme
# (c) 2009 Jakub Steiner, Aaron Bockover, Novell Inc.
# based on Shiki-Wise by perfectska04 (Victor C.)
gtk_color_scheme = "fg_color:#202020\nbg_color:#D5DAD5\nbase_color:#fff\ntext_color:#3A3A3A\nselected_bg_color:#5E7F3E\nselected_fg_color:#fff\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000\nmenu_fg_color:#f6f6f6\nmenu_bg_color:#303030"
gtk-icon-sizes = "gtk-button = 16,16"
#
#!/usr/bin/env python
import gconf
GCONF_DIR = "/apps/gwibber"
client = gconf.client_get_default()
def get_value(value):
if value.type.value_nick == "list":
return [get_value(item) for item in value.get_list()]
111c111
< $tidy = new tidy();
---
> //$tidy = new tidy();
146,148c146,149
< $tidy->parseString($content, $config, 'utf8');
< $tidy->cleanRepair();
< $data['content'] = $tidy;
---
> //$tidy->parseString($content, $config, 'utf8');
#!/usr/bin/env python
import gobject
gobject.threads_init()
import desktopcouch, pycurl, oauth, threading, urllib, json
from desktopcouch.records.server import CouchDatabase
from desktopcouch.records.record import Record as CouchRecord
OAUTH_DATA = desktopcouch.local_files.get_oauth_tokens()
@segphault
segphault / couchdb-change-monitor.py
Created December 5, 2009 02:27
Monitor changes in Desktop CouchDB
#!/usr/bin/env python
import desktopcouch, pycurl, urllib, oauth
OAUTH_DATA = desktopcouch.local_files.get_oauth_tokens()
def build_request(path, params, odata=OAUTH_DATA):
url = "http://localhost:%s/%s?%s" % (desktopcouch.find_port(), path, urllib.urlencode(params))
oconsumer = oauth.oauth.OAuthConsumer(odata["consumer_key"], odata["consumer_secret"])
otoken = oauth.oauth.OAuthToken(odata["token"], odata["token_secret"])
@segphault
segphault / gist:247474
Created December 2, 2009 19:32
Ars Feed Wall QML Demo
import Qt 4.6
Rect {
id: Page
width: 960; height: 720
color: "#201F25"
Rect {
#!/usr/bin/env python
import csv, fileinput
TEMPLATE = """
<div class="news-item-figure CenteredImage" style="width:640px;">
<div class="news-item-figure-image">
<img src="%(Image Link)s"/>
</div>
</div>