recho is Officially here
This file contains hidden or 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
## Pseudo auto-respond-to in Sinatra. | |
module Sinatra | |
module AutoRespondTo | |
def self.registered(app) | |
app.after do | |
case request.accept.first | |
when "application/json" | |
body { body.to_json } | |
when "application/xml" |
This file contains hidden or 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
# include at least one source and the rails gem | |
source :gemcutter | |
gem 'sinatra' | |
group :development do | |
# bundler requires these gems in development | |
gem 'rails-footnotes' | |
end | |
group :test do |
This file contains hidden or 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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.64. Invocation command line was | |
$ ./configure --prefix=/usr/local/lib/ruby/gems/1.8/gems/gdb.rb-0.1.1/ext/dst/ | |
## --------- ## | |
## Platform. ## |
This file contains hidden or 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
have_header: checking for python2.5/Python.h... -------------------- yes | |
"gcc -E -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -g -Os -fno-strict-aliasing conftest.c -o conftest.i" | |
checked program was: | |
/* begin */ | |
1: #include <python2.5/Python.h> | |
/* end */ | |
-------------------- |
This file contains hidden or 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
screen -X "split" | |
screen -X "focus" | |
screen -X "screen" | |
screen -X exec ! $@ |
This file contains hidden or 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
require 'sinatra-jruby-glassfish' | |
# You would only say MyApp.run! is | |
# how you run Sinatra::Base apps | |
# when there is no rackup file | |
# Use this in a rackup file | |
run MyApp |
This file contains hidden or 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
rack_hoptoad |
This file contains hidden or 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 macruby | |
framework 'Cocoa' | |
## I want something like this to work. | |
char *p = "testing" | |
## along side of this | |
10.times { puts p } |
This file contains hidden or 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
require 'sinatra' | |
get '/example-view' do | |
@name = "testing" | |
erb(:example_view) | |
end |