Skip to content

Instantly share code, notes, and snippets.

View BinaryMuse's full-sized avatar
🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
View GitHub Profile
@BinaryMuse
BinaryMuse / README.md
Created July 9, 2010 16:42
GWT-Wizard Sample Code

Sample code from a page of the Fresno Pacific University Vehicle Reservation Wizard.

RequesterInfoPage.java defines the business logic for the page, as well as the Display interface for the UI; RequesterInfoPageView.java implements the Display interface. Notice that the view extends LazyComposite to lazily create the view on demand (the first time the page is shown).

@BinaryMuse
BinaryMuse / ContextRemoteServiceServlet.java
Created July 14, 2010 22:09
policy file fix for GWT app behind reverse proxy
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.google.gwt.user.server.rpc.SerializationPolicy;
import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
<div id='sidebar'>
<%= section(:sidebar) || partial(:default_sidebar) %>
</div>
@BinaryMuse
BinaryMuse / longest_palindrome.rb
Created October 15, 2010 21:44
O(n^3) Solution for Programming Praxis 2010-10-15: Find The Longest Palindrome In A String
#!/usr/bin/env ruby
## Find The Longest Palindrome In A String
## October 15, 2010
##
## http://programmingpraxis.com/2010/10/15/find-the-longest-palindrome-in-a-string/
##
## Greplin issued a programming challenge recently that required programmers
## to solve three problems; when completed, Greplin issued an invitation to
## send them a resume. The first problem required the programmer to find the
@BinaryMuse
BinaryMuse / longest_palindrome.rb
Created October 15, 2010 22:58
O(n^2) Solution for Programming Praxis 2010-10-15: Find The Longest Palindrome In A String edit
#!/usr/bin/env ruby
## Find The Longest Palindrome In A String
## October 15, 2010
##
## http://programmingpraxis.com/2010/10/15/find-the-longest-palindrome-in-a-string/
##
## Greplin issued a programming challenge recently that required programmers
## to solve three problems; when completed, Greplin issued an invitation to
## send them a resume. The first problem required the programmer to find the
@BinaryMuse
BinaryMuse / .gems
Created October 29, 2010 22:17
xkcd2.heroku.com : Sinatra app to display xkcd comics so that the alt text can be seen
sinatra
haml
@rjacoby
rjacoby / gist:665090
Created November 6, 2010 01:02
.irbrc
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
require 'hirb'
#Hirb::View.enable
Hirb.enable :pager=>false
@dolzenko
dolzenko / rails_with_ssl
Created November 12, 2010 14:09
script/rails_with_ssl
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
# Augmented version which starts server in SSL mode. Creating certificates: http://www.zunisoft.com/?p=740
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands/server'
require 'rack'
require 'webrick'
require 'webrick/https'
@LeFnord
LeFnord / rails3_template.rb
Created November 12, 2010 18:24
An application template for Rails 3 including: authlogic, haml, rspec, compass-susy, jquery ... go running ;)
# An application template for Rails 3
gem "factory_girl_rails", :group => [:development, :test]
gem "factory_girl_generator", :group => [:development, :test]
gem "rspec", :group => [:development, :test]
gem "rspec-rails", :group => [:development, :test]
gem "haml"
gem "haml-rails"
gem "authlogic", :git => "git://github.com/odorcicd/authlogic.git", :branch => "rails3"
@BinaryMuse
BinaryMuse / gist_tag.rb
Created January 31, 2011 00:44
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text