Public Gists by ubermajestix

Gravatar
Thu Nov 05 12:20:28 -0800 2009
1
2
3
# ex: ruby tip_palindrome.rb 62.50 0.2 #=> total: 75.57 with tip: 13.07
sub_total, tip = *ARGV
total = (sub_total.to_f * tip.to_f) + sub_total.to_f
Gravatar
Thu Aug 20 13:22:20 -0700 2009
1
2
3
require 'xmpp4r/client'
module JabberLogger
  include Jabber
Gravatar
Tue Aug 18 16:22:12 -0700 2009
1
2
3
#!/usr/local/bin/ruby
 
require 'rubygems'
Gravatar
Wed Aug 05 10:14:48 -0700 2009
1
2
3
module SomeModule
  
  class << self
Gravatar
Wed Aug 05 10:13:15 -0700 2009
1
2
3
  require 'rubygems'
  require 'logging'
 
Gravatar
Wed Jul 29 11:01:44 -0700 2009
1
2
3
# think this is what's fucking us:
 next if request.path_info =~ %r!/events/[^/]{36}!
 unless session[:user_id]
Gravatar
Wed May 13 10:22:15 -0700 2009
1
2
3
function specials(password){
var specials = !!password.match(/([\@\#\$\&\!\)\(\-\+\=\^])/)
return specials
Gravatar
Tue May 12 12:09:45 -0700 2009
1
2
3
require 'twitter'
 
followers = Twitter.follower_ids('ubermajestix')
Gravatar
Tue May 12 12:01:55 -0700 2009
1
2
3
require 'twitter'
require 'pp'
 
Gravatar
Sat Apr 25 14:26:29 -0700 2009
1
2
3
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
  <Response>
Gravatar
Sat Apr 25 14:19:03 -0700 2009
1
2
3
require 'nokogiri'
require 'open-uri'
  
Gravatar
Tue Mar 24 10:51:08 -0700 2009
1
2
3
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] = ENV["CI_ENV"] || "test"
ENV["DETACH"] = "true"
Gravatar
Mon Mar 16 23:37:28 -0700 2009
1
2
3
// PasswordValidation.js Tyler Montgomery 3/17/09
// Used to validate a password as you type
// Password requires length > 5, numbers, letters, and special characters
Gravatar
Mon Feb 23 11:16:02 -0800 2009
1
2
3
#...
 
Rails::Initializer.run do |config|
Gravatar
Tue Feb 17 10:24:47 -0800 2009
1
2
3
abstract (1.0.0)
actionmailer (2.2.2, 2.0.2, 1.3.3)
actionpack (2.2.2, 2.0.2, 1.13.3)
Gravatar
Tue Feb 10 08:45:58 -0800 2009
1
2
3
# this is from my users_controller file
  def reset_password
    # reset user's password here...
gist: 52914 keep users from navigating ...
Gravatar
Mon Jan 26 10:53:53 -0800 2009
1
2
3
# in your layout
<head>
  <%= stylesheet_link_tag'styles' %>
Gravatar
Tue Jan 13 10:27:47 -0800 2009
1
2
3
  def add_url_markup(text)
    urls = []
    users =[]
Gravatar
Tue Oct 07 13:37:08 -0700 2008
1
2
3
    def tyler_paginate(collection, opts={} )
       #next / prev / pages
       page_count = WillPaginate::ViewHelpers.total_pages_for_collection(collection)
Gravatar
Tue Oct 07 09:36:25 -0700 2008
1
2
3
#!/usr/bin/env ruby
require 'rubygems'
require 'open-uri'