This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[23:01:04] phlipper@roadie [~]$ whois google.com | |
Whois Server Version 2.0 | |
Domain names in the .com and .net domains can now be registered | |
with many different competing registrars. Go to http://www.internic.net | |
for detailed information. | |
GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM | |
GOOGLE.COM.ZZZZZ.DOWNLOAD.MOVIE.ONLINE.ZML2.COM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- _product.html.erb --> | |
<% div_for(product) do %> | |
<p id="<%= dom_id(product, "price") %>"><%=h product.price %></p> | |
<!-- periodic update ... --> | |
<%= image_tag(product.photo.url(:thumb), :id => dom_id(product, "photo")) %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= link_to "Contact Us", page_url("contact"), :class => current_page?(page_url("contact")) ? "active" : "" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rgbToHex(r, g, b) { | |
return toHex(r) + toHex(g) + toHex(b); | |
} | |
function toHex(n) { | |
if (n == null) { return '00'; } | |
n = parseInt(n); | |
if (n == 0 || isNaN(n)) { return '00'; } | |
n = Math.max(0, n); n = Math.min(n, 255); n = Math.round(n); | |
chars = '0123456789ABCDEF'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# pman -- create, print, save, view PDF man pages | |
# | |
# Author: ntk | |
# License: The MIT License, Copyright (c) 2007 ntk | |
# Description: (batch) convert man pages into PDF documents and save them to a specified directory; (batch) print or view PDF man pages from the command line | |
# Platform: Mac OS X 10.4.10; man bash | |
# Installation: put pman() into ~/.bash_login (or alternatives) | |
# | |
# Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[22:05:59] phlipper@Trimaxion [~/Projects/shasta]$ ./script/console | |
Loading development environment (Rails 2.3.10) | |
** Erubis 2.6.6 | |
rails_xss requires Rails 2.3.8 or later. Please upgrade to enable automatic HTML safety. | |
** Erubis 2.6.6 | |
>> Rails.version | |
=> "2.3.10" | |
>> Rails.version <= "2.3.1" | |
=> false | |
>> Rails.version <= "2.3.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Timer | |
attr_accessor :seconds | |
def initialize(value = 0) | |
@seconds = value | |
end | |
def to_s | |
time_left = @seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paperclip.interpolates :normalized_basename do |attachment, style| | |
filename = attachment.instance.data_file_name | |
basename = File.basename(filename, File.extname(filename)) | |
basename.gsub(/[^\w\d_-]/i, " ").gsub(/\s+/, "-") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[10:08:24] phlipper@Trimaxion [~/Projects/kidsruby]$ bundle | |
Fetching source index for http://rubygems.org/ | |
Installing rake (0.8.7) | |
Installing htmlentities (4.2.3) | |
Installing mocha (0.9.10) | |
Installing qtbindings (4.6.3.2) with native extensions /Users/phlipper/.rvm/gems/macruby-0.9@kidsruby/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install:': ERROR: Failed to build gem native extension. | |
/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macruby extconf.rb | |
make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% zombie = Zombie.first %> | |
<p> | |
<%= link_to zombie.name, zombie %> | |
</p> |
OlderNewer