Skip to content

Instantly share code, notes, and snippets.

View wfarr's full-sized avatar
:shipit:
shipping

Will Farrington wfarr

:shipit:
shipping
  • Salesforce
  • Atlanta, GA
View GitHub Profile
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing': uninitialized constant RedCloth::TextileDoc::BASIC_TAGS (NameError)
from /home/wfarrington/nex3-s-blog-engine/lib/codecloth.rb:17:in `included'
from /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.3/lib/redcloth.rb:27:in `include'
from /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.3/lib/redcloth.rb:27:in `send'
from /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.3/lib/redcloth.rb:27:in `include'
from /home/wfarrington/nex3-s-blog-engine/lib/codecloth.rb:91:in `send'
from /home/wfarrington/nex3-s-blog-engine/lib/codecloth.rb:91
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
... 32 levels...
module Merb
module PostsHelper
def generate_post_link(post)
"posts/view/#{post.id}-#{post.slug}"
end
def generate_post_date(post)
"Posted #{print_date(post.created_at)}"
end
class Post
include DataMapper::Resource
property :id, Serial
property :title, String
property :content, Text
property :tags, String
property :slug, String
property :created_at, DateTime
property :updated_at, DateTime
require 'hotcocoa'
include HotCocoa
application do |app|
window :size => [200, 100] do |win|
win.view = layout_view :mode => :vertical do |layout|
layout.spacing = 10
btn = button(:title => "click me", :layout => {:align => :center})
lbl = label(:text => "text", :layout => {:align => :center})
class Post
include DataMapper::Resource
property :id, Serial
property :title, String
property :content, Text
property :tags, String
property :slug, String
property :created_at, DateTime
property :updated_at, DateTime
- (@posts.reverse)[0..10].each do |post|
%a{:href => "view/#{post.id}-#{post.slug}", :title => "#{post.title}" }
%h3= post.title
require 'hotcocoa'
include HotCocoa
application do |app|
window :size => [200, 100] do |win|
win.view = layout_view :mode => :vertical do |layout|
layout.spacing = 10
b = button :title => "click me", :layout => {:align => :center}
l = label :text => "", :layout => {:align => :center}
wfarr@lawn-128-61-22-6:~$ echo "some data" > data.txt
wfarr@lawn-128-61-22-6:~$ ln -s data.txt slink.txt
wfarr@lawn-128-61-22-6:~$ cat slink.txt
some data
#!/bin/sh
mkdir ln_test && cd ln_test/
echo "Some test" > test_file
echo "Make sure test_file exists"
echo ""
exist=`ls -ali | grep test_file`
if [ "$exist" != "" ]; then
[20:56] <offby1> I suspect math is the _only_ field for which LaTeX really
makes sense
[20:56] <wfarr> offby1: I use it to write my notes and any papers as well.
[20:56] <offby1> wfarr: well, sure, but I use Emacs to read mail: some
people are insane :)