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
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |
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
source :rubygems | |
gem 'sinatra', '1.2.3' | |
gem 'tilt', "1.3" | |
gem 'rack', "1.2.2" | |
gem 'sinatra-respond_to', '0.7.0' |
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
gzip on; | |
gzip_types text/plain text/xml text/css application/javascript application/x-javascript; | |
location ~* \.(ico|css|js|gif|jp?g|png|swf)(\?[0-9]+)?$ { | |
expires max; | |
} |
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
class BugTest1 < Hash | |
# Any interface will do | |
include Java::JavaLang::Runnable | |
def run | |
puts "Hello from BugTest1" | |
end | |
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
import java.util.Calendar; | |
public final class Periodo { | |
private final Calendar inicio; | |
private final Calendar fim; | |
public Periodo(Calendar inicio, Calendar fim) { | |
this((Calendar) inicio.clone(), (Calendar) fim.clone(), false); | |
} |
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
def should_behave_like_resource(opts = {}) | |
before :each do | |
@opts = opts | |
end | |
def class_for(str) | |
str.capitalize.constantize | |
end | |
def clazz |
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
public class HibernateUtil { | |
private static final SessionFactory sessionFactory; | |
static { | |
AnnotationConfiguration configuration = new AnnotationConfiguration(); | |
configuration.addAnnotatedClass(Usuario.class); | |
sessionFactory = configuration.buildSessionFactory(); | |
new SchemaExport(configuration).create(true, false); |
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
package br.com.caelum.produto.dao; | |
import org.hibernate.Session; | |
import br.com.caelum.produto.modelo.Produto; | |
public class ProdutoDAO { | |
private Session session; | |
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
package br.com.caelum.agenda.servlet; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; |
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 ruby | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
configure :development do | |
set :rra_path, "" | |
end | |
configure :production do |