Skip to content

Instantly share code, notes, and snippets.

View zenchild's full-sized avatar

Dan Wanek zenchild

View GitHub Profile
@jedi4ever
jedi4ever / gist:1001978
Created June 1, 2011 08:27
vsphere -ruby testing notes
To setup a test environment
- install vmware Fusion (trial)
- install A machine (windows 2003 / 64 Bit /trial available)
- install B machine (ESX) (trial download)
- install on A, vsphere server (trial download/requires Win2003/Win2008)
- install on A, vsphere client
- import ESX host B into vsphere via vsphere client
- create a user vmware (Local User)
- put it in Administrator group
@ryanb
ryanb / application.html.erb
Created January 19, 2011 19:31
Example of very simple password authentication.
<!-- layout file -->
<% if current_user %>
Welcome <%= current_user.username %>. Not you? <%= link_to "Log out", logout_path %>
<% else %>
<%= link_to "Sign up", signup_path %> or <%= link_to "log in", login_path %>.
<% end %>
@mudge
mudge / gist:428455
Created June 7, 2010 09:29
Namespaces with Nokogiri::Builder
# Dealing with namespaces in Nokogiri.
#
# First thing you must do is abandon what you're used to with Builder,
# namespaces aren't just attributes on an element, they uniquely identify
# what sort of element you are building and, as such, you are better off
# specifying them manually.
#
# The key here is accessing the Nokogiri::XML::Element being built with
# b.parent, then you can set the namespace (distinguished by an element
# with a prefix such as "soap12:Envelope") or add a default namespace