Skip to content

Instantly share code, notes, and snippets.

class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_rich_snippets do
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username
text tweetText
end
# this locks out other plugins until a confirmation or deny
confirm do
confirmed do
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_wolfram_snippet [
{image: 'http://cl.ly/1l040J1A392n0M1n1g35/content'}, # this just makes things looks nice, but is obviously specific to my username
{text: tweetText}
]
# this locks out other plugins until a confirmation or deny
source :gemcutter
gem 'CFPropertyList'
gem 'eventmachine'
gem 'uuidtools'
gem 'libxml-ruby'
# load plugins
require 'yaml'
port: 4433
plugins:
- SimplePlugin # simple syntax for plugins that are in rubygems and have no config
- name: 'Twitter'
path: './plugins/testproxy' # path works just like specifing in gemfile
# custom args for plgin to use
consumer_key: "YOUR KEY"
consumer_secret: "YOUR SECRET"
oauth_token: "YOUR TOKEN"
oauth_token_secret: "YOUR TOKEN SECRET"
class SiriPlex < SiriPlugin
context :default do
listen_for /play (*)/i do|showName|
# parse season/episode if present get results from plex db
if noEpisodeSpecified
switch_context :prompt_for_episode_number
else
# play the show
end
end
@netpro2k
netpro2k / gist:709570
Created November 22, 2010 05:39
libfreenect homebrew formula
# install homebrew (details here: https://github.com/mxcl/homebrew/wiki/installation or just run the following command)
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
# install xcode: http://developer.apple.com/technologies/xcode.html
# install homebrew formulas (this should eventually be in official homebrew repo)
cd /usr/local/Library/Formula
curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libfreenect.rb"
curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libusb-freenect.rb"
@netpro2k
netpro2k / gist:709237
Created November 21, 2010 22:36
glview for mac
/*
* This file is part of the OpenKinect Project. http://www.openkinect.org
*
* Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
* for details.
*
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public License,
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
* or the following URLs:
@netpro2k
netpro2k / gist:708654
Created November 21, 2010 11:18
openkinect glView done in OpenCV
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include "libfreenect.h"
#include <pthread.h>
freenect_context *f_ctx;
freenect_device *f_dev;
IplImage* rgbBack;
@netpro2k
netpro2k / GetGlueIcefilms.user.js
Created November 2, 2010 02:44
Add a GetGlue Widget to icefilms pages
// ==UserScript==
// @name GetGlue IceFilms Widget
// @author Dominick D'Aniello
// @namespace http://netpro2k.com/
// @description Add a GetGlue Widget to icefilms pages
// @include http://www.icefilms.info/ip.php?v=*
// ==/UserScript==
var st = document.createElement('script');
st.setAttribute('type', 'text/javascript');
@netpro2k
netpro2k / GetGlueAutoPager.user.js
Created October 31, 2010 21:39
Auto page streams on GetGlue.com
// ==UserScript==
// @name GetGlue AutoPager
// @author Dominick D'Aniello
// @namespace http://netpro2k.com/
// @description Auto page streams on GetGlue.com
// @include http://getglue.com/streams
// @include http://getglue.com/streams/*
// ==/UserScript==
var st = document.createElement('script');