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
Ext.define('MyApp.store.base.RedditStore', { | |
extend: 'Ext.data.Store', | |
config: { | |
storeId: 'MyJsonPStore', | |
proxy: { | |
type: 'jsonp', | |
url: 'http://www.reddit.com/hot.json', | |
callbackKey: 'jsonp', | |
reader: { |
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
framework "calendarstore" | |
store = CalCalendarStore.defaultCalendarStore | |
pred = CalCalendarStore.taskPredicateWithCalendars(store.calendars) | |
reminders = store.calendars.find {|c| c.title == "Reminders"} | |
newTask = CalTask.alloc.init | |
newTask.title = "This is a test" | |
newTask.calendar = reminders |
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 performSearch(pred, &cb) | |
search = NSMetadataQuery.alloc.init | |
search.predicate = pred | |
search.searchScopes = [File.expand_path("~")] | |
NSNotificationCenter.defaultCenter.addObserverForName( | |
"NSMetadataQueryDidFinishGatheringNotification", object:nil, queue:nil, | |
usingBlock: Proc.new {|n| n.object.results.each {|r| cb.call(r) } }) | |
search.startQuery |
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
// | |
// Moonbase Mayhem | |
// | |
var util = require('util'); | |
var events = require('events'); | |
function Game() { | |
events.EventEmitter.call(this); |
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
<html> | |
<head> | |
<title>HTML5 Photo Booth</title> | |
</head> | |
<body> | |
<h2>HTML5 Photo Booth</h2> | |
<video id="live" autoplay></video> | |
<canvas id="snapshot" style="display:none"></canvas> | |
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
<html> | |
<head> | |
<title>HTML5 Webcam Test</title> | |
</head> | |
<body> | |
<h2>The Thing cannot be described—there is no language for such abysms of shrieking and immemorial lunacy, such eldritch contradictions of all matter, force, and cosmic order</h2> | |
<video id="live" autoplay></video> | |
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
#!/usr/bin/env python | |
import gtk, pango, gobject | |
import urllib2, base64, time, datetime, os | |
try: | |
import simplejson | |
def loadjson(content): return simplejson.loads(content) | |
except: | |
def loadjson(content): |
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
tell application "Dock" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "Dock" | |
set frontmost to true | |
activate | |
tell list 1 | |
perform action "AXShowMenu" of UI element "Google Chrome" |
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
=== modified file 'client/gwibber-client.vala' | |
--- client/gwibber-client.vala 2010-11-22 02:06:24 +0000 | |
+++ client/gwibber-client.vala 2010-11-22 04:44:23 +0000 | |
@@ -34,6 +34,7 @@ | |
"Jorge Castro", | |
"Gustavo Niemeyer", | |
"Ted Gould"}; | |
+ | |
var messages = new string[10] { | |
"Adding unit tests to the Unity panel service. Mixing GTester + C++ is interesting, definitely not as bad as I thought it would be.", |
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
#!/usr/bin/env python | |
import gtk, dbus, dbus.service, sqlite3 | |
from dbus.mainloop.glib import DBusGMainLoop | |
DB_FILENAME = "/home/segphault/test.sqlite" | |
DBusGMainLoop(set_as_default=True) | |
class Notifier(dbus.service.Object): |