Public Gists by mlangenberg

Gravatar
Thu Jul 09 13:09:51 -0700 2009
1
<img id="ctl02_ctl00_ClubInfo_imgIcon" onmouseover="this.style.cursor = 'hand'" onclick="popUpWindow('&lt;html>&lt;head>&lt;title>&lt;/title>&lt;script type=&quot;text/javascript&quot;>function fitPic() { if (window.innerWidth){iWidth = window.innerWidth;iHeight = window.innerHeight;}else{iWidth = document.body.clientWidth;iHeight =document.body.clientHeight;}iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;iWidth = iWidth + 30;iHeight = iHeight + 65;window.resizeBy(iWidth, iHeight); if (window.outerWidth){resizedWidth = window.outerWidth;resizedHeight = window.outerHeight;}else{resizedWidth = document.body.offsetWidth;resizedHeight =document.body.offsetHeight;}if(window.screen){var WndTop = (screen.availHeight - resizedHeight) / 2;var WndLeft = (screen.availWidth - resizedWidth ) / 2;self.moveTo(WndLeft,WndTop); if(resizedHeight&lt;screen.availHeight){if (document.body) {document.body.scroll=&quot;no&quot;}}};};&lt;/script>&lt;/head>&lt;body onload=&quot;fitPic();&quot;>&lt;style type=&quot;text/css&quot;>&lt;!--td { font-family: Verdana,Arial, Helvetica, sans-serif; font-size: 12px; }.close { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #000000; text-decoration: none; background-color: #CCCCCC; border: 1px solid #000000; padding-right: 2px; padding-left: 2px;}-->&lt;/style>&lt;table border=&quot;0&quot; style=&quot;text-align:center;&quot; class=&quot;ImageOpenerContainer&quot;>&lt;tr>&lt;td class=&quot;ImageOpenerCell&quot;>&lt;img src=&quot;/resourceserver/7471/95e4e809-63e6-4a8c-8253-eeb54a815126/33a/rglang/en-US/filename/95e.jpg&quot; alt=&quot;&quot;/>&lt;/td>&lt;/tr>&lt;tr>&lt;td class=&quot;ImageOpenerTextContainer&quot;>&lt;table border=&quot;0&quot; width=&quot;100%&quot; class=&quot;ImageOpenerTextContainer&quot;>&lt;tr>&lt;td class=&quot;ImageOpenerTitle&quot;>&lt;/td>&lt;td style=&quot;text-align:center&quot; valign=&quot;middle&quot; class=&quot;ImageOpenerCloseButton&quot;>&lt;a href=&quot;#&quot; class=&quot;close&quot; onClick=&quot;javascript:self.close();&quot;>X&lt;/a>&lt;/td>&lt;/tr>&lt;/table>&lt;/td>&lt;/tr>&lt;/table>&lt;/body>&lt;/html>',400,400);" src="/resourceserver/7471/91da0e63-00e6-4ca0-9adf-6e3d43c82176/a91/rglang/en-US/filename/91d.jpg" style="border-width:0px;" />
Gravatar
Wed Jan 14 06:47:37 -0800 2009
1
2
3
map.resources :posts #=> /posts/2/comments
map.resources :comments #=> /comments
 
Gravatar
Mon Dec 01 05:07:54 -0800 2008
1
dsfdsafsadfsdfsdf
Gravatar
Fri Nov 14 02:10:11 -0800 2008
1
2
3
>> regel = 'Welkom <%= t(:dames) %> en <%= t(:heren) %>. <%= t(:tot_ziens) %>.'
=> "Welkom <%= t(:dames) %> en <%= t(:heren) %>. <%= t(:tot_ziens) %>."
>> regel.scan(/t\W:(\w*)/)
Gravatar
Tue Oct 07 03:58:32 -0700 2008
1
2
3
function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
Gravatar
Tue Oct 07 03:55:39 -0700 2008
1
Dit is een test
Gravatar
Tue Sep 16 05:41:12 -0700 2008
1
2
3
app = Merb::Rack::Application.new
request = fake_request({:request_uri => '/test'})
response = app.call(request.env)
Gravatar
Sun Sep 14 13:57:23 -0700 2008
1
2
3
describe 'Car' do
  describe "when starting" do
    before :each do
Gravatar
Fri Sep 12 10:50:55 -0700 2008
1
2
3
From f88f4f56eeaf1f4a0f66dae3933147d10e971aea Mon Sep 17 00:00:00 2001
From: Matthijs Langenberg <mlangenberg@gmail.com>
Date: Fri, 12 Sep 2008 17:16:20 +0200
Gravatar
Tue Sep 09 08:40:03 -0700 2008
1
2
3
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
Gravatar
Tue Sep 09 07:00:22 -0700 2008
1
2
3
# locatie: /app/views/wordpress/page_view.rb
class PageView
  def initialize(page)
Gravatar
Thu Aug 28 09:19:52 -0700 2008
1
2
3
module Extlib
  def self.class_inheritable_reader(klass, *ivars)
    instance_reader = ivars.pop[:reader] if ivars.last.is_a?(Hash)
Gravatar
Thu Aug 28 01:24:54 -0700 2008
1
2
3
module Lib
  def self.my_attr_accessor(klass, attr)
    klass.class_eval "def #{attr.to_s}; @#{attr.to_s}; end"
Gravatar
Thu Aug 28 01:24:54 -0700 2008
1
2
3
module Lib
  def self.my_attr_accessor(klass, attr)
    klass.class_eval "def #{attr.to_s}; @#{attr.to_s}; end"
Gravatar
Thu Aug 28 01:02:37 -0700 2008
1
2
3
module Lib
  def self.my_attr_reader(klass, attr)
    eval %{
Gravatar
Wed Aug 27 07:09:40 -0700 2008
1
2
3
 ~ Started request handling: Wed Aug 27 16:07:57 +0200 2008
 ~ Params: {"action"=>"new", "namespace"=>"admin", "controller"=>"sites"}
 ~ undefined method `new' for nil:NilClass - (NoMethodError)
Gravatar
Wed Aug 27 07:09:07 -0700 2008

      
Gravatar
Wed Aug 27 06:54:33 -0700 2008
1
2
3
 ~ undefined method `new' for nil:NilClass - (NoMethodError)
/Library/Ruby/Gems/1.8/gems/merb_helpers-0.9.5/lib/merb_helpers/form/helpers.rb:10:in `_singleton_form_context'
/Library/Ruby/Gems/1.8/gems/merb_helpers-0.9.5/lib/merb_helpers/form/helpers.rb:18:in `current_form_context'
Gravatar
Wed Aug 27 04:09:05 -0700 2008
1
2
3
class Test < Application
 
  # ...and remember, everything returned from an action
Gravatar
Wed Aug 27 02:44:25 -0700 2008
1
2
3
require 'rubygems'
require 'merb-core'