Skip to content

Instantly share code, notes, and snippets.

def hello
p "Hello, world!"
end
@juvenn
juvenn / mustache.vim
Created October 16, 2009 09:02
Syntax hilighting for Mustache
" Vim syntax file
" Language: Mustache
" Maintainer: Juvenn Woo <machese@gmail.com>
" Screenshot: http://imgur.com/6F408
" Version: 1
" Last Change: 2009 Oct 15
" Remark:
" It lexically hilights embedded mustaches (exclusively) in html file.
" While it was written for Ruby-based Mustache template system, it should work for Google's C-based *ctemplate* as well as Erlang-based *et*. All of them are, AFAIK, based on the idea of ctemplate.
" References:
@juvenn
juvenn / gist:215219
Created October 21, 2009 16:16 — forked from defunkt/gist:6443
Chris's Talk
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@juvenn
juvenn / heroku push error
Created October 27, 2009 02:37
heroku push error
$ git push heroku
Counting objects: 12, done.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.65 KiB, done.
Total 10 (delta 6), reused 0 (delta 0)
-----> Heroku receiving push
-----> Sinatra app detected
Compiled slug size is 272K
-----> Launching........................................................... failed (Heroku error)
@juvenn
juvenn / mustache compile_partial diff
Created October 27, 2009 17:58
mustache compile_partial hacking
$ git diff --cached mustache/template.rb
diff --git a/vendor/mustache/mustache/template.rb b/vendor/mustache/mustache/template.rb
index 365e421..5b98d29 100644
--- a/vendor/mustache/mustache/template.rb
+++ b/vendor/mustache/mustache/template.rb
@@ -131,12 +131,18 @@ class Mustache
# Partials are basically a way to render views from inside other views.
def compile_partial(name)
@juvenn
juvenn / index.mustache
Created October 28, 2009 07:22
mustache things
{{#posts}}
{{! this is post stuff}}
{{/posts}}
@juvenn
juvenn / app.yaml
Created January 7, 2010 04:09 — forked from aggieben/app.yaml
application: bt-coronet
version: 1
runtime: python
api_version: 1
handlers:
- url: /s
static_dir: static
- url: /favicon.ico
The error must be caused by exmpp_jid:to_lower("").
I suspect the problem is, after superfeedr authorized my request with:
<iq type="result" id="auth" />
it sends a
<presence />
class PuSHCallback < EM::Connection
include EM::HttpServer
def post_init
puts Time.now.to_s + "> New callback initialized"
end
def process_http_request
response = EM::DelegatedHttpResponse.new(self)
puts Time.now.to_s + "> Verify requset from " + @http_request_uri
$ curl -d "hub.verify=ksflsdfjl&hub.token=dsklafjl&hsadkfj=18972347" "http://localhost:8080/subbub?a=8437&b=85498&c=385794"
http_protocol:HTTP/1.1
http_request_method:POST
http_cookie:
http_if_none_match:
http_content_type:application/x-www-form-urlencoded
http_path_info:/subbub
http_request_uri:/subbub
http_query_string:a=8437&b=85498&c=385794