Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Ping.fm to Rejaw Custom URL Script
#
# Before you can use, you will need to add the path of this file to
# the custom URL settings in your Ping.fm account: http://ping.fm/custom/.
#
# For further information on custom URL integration, check out the awesome help
# page: http://ping.fm/custom/help/
#
require "rubygems"
require "mechanize"
require "singleton"
LOGIN = 'http://edno23.mobi/login'.freeze
POST = 'http://edno23.mobi/post'.freeze
USER = 'username'.freeze
PASS = 'password'.freeze
class Edno23
@zh
zh / api.rb
Created September 11, 2008 08:19
TOKEN = 'MY_SECRET'.freeze
class ApiController < Ramaze::Controller
map '/api'
def index t=nil
if t && (TOKEN == t) && request.post?
Edno23.login('username','password')
Edno23.post(request[:message])
@zh
zh / gist:11365
Created September 18, 2008 03:39
--- maildaemon.php 2008-09-18 12:11:19.000000000 +0900
+++ maildaemon.php.new 2008-09-18 12:36:11.000000000 +0900
@@ -29,6 +29,7 @@
require_once(INSTALLDIR . '/lib/common.php');
require_once(INSTALLDIR . '/lib/mail.php');
+require_once('Mail/RFC822.php');
require_once('Mail/mimeDecode.php');
# FIXME: we use both Mail_mimeDecode and mailparse
@zh
zh / gist:11369
Created September 18, 2008 04:06
--- scripts/maildaemon.php 2008-09-18 12:58:39.000000000 +0900
+++ /var/www/laconica/scripts/maildaemon.php.new 2008-09-18 13:01:01.000000000 +0900
@@ -30,6 +30,7 @@
require_once(INSTALLDIR . '/lib/common.php');
require_once(INSTALLDIR . '/lib/mail.php');
require_once('Mail/mimeDecode.php');
+require_once('Mail/RFC822.php');
# FIXME: we use both Mail_mimeDecode and mailparse
# Need to move everything to mailparse
@zh
zh / xsend.rb
Created December 3, 2008 07:19
#!/usr/bin/env ruby
require 'rubygems'
require 'xmpp4r'
include Jabber
unless ARGV[0]
p "Usage: #{$0} MSG"
exit
#!/usr/bin/env ruby
#
# Purpose: Simple web form to send messages via XMPP to juick.com
# Usage: ruby rack2juick.rb and point your browser to
# http://127.0.0.1:9292/
require 'rubygems'
require 'rack'
require 'rack/request'
require 'rack/response'
#!/usr/bin/env ruby
#
# Purpose: Simple web form to send messages via XMPP to juick.com
# Usage: ruby rack2juick.rb and point your browser to
# http://127.0.0.1:9292/
# user: user, password: secret
require 'rubygems'
require 'rack'
require 'rack/request'
require 'rubygems'
require 'mechanize'
require 'singleton'
LOGIN = 'http://zh.github.com/prowl_login.html'.freeze
POST = 'http://zh.github.com/prowl.html'.freeze
USER = 'PROWL_USER'.freeze
PASS = 'PROWL_PASSWORD'.freeze
class ProwlAPI
// start: node atomizer.js
var sys = require('sys'), fs = require('fs'),
url = require("url"),
path = require("path"),
http = require("http"),
port = process.env.PORT || 8001,
counter = 0
var BASE = "http://atomizer.heroku.com"