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).

<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"

Introduction

Imagine one was required to create a web-based password management system (over SSL! :) with the following requirements:

  1. Individual users sign in to the system using their own unique pass phrase.
  2. This pass phrase should be enough to allow the user to use the system effectively (e.g. from a smartphone, etc.)--the point being that they should not have to keep a key file with them.
@BinaryMuse
BinaryMuse / gist:967149
Created May 11, 2011 19:35
Verifying CampusCruiser SSO Signature
require 'sinatra'
require 'base64'
require 'cgi'
require 'erb'
require 'openssl'
require 'nokogiri'
def get_sso_data(env)
CGI.unescape env["rack.request.form_hash"]["imsEnterprise"]
end