cheat sheets.

$ cheat nonsense
--- nonsense version 1	Thu Jul 09 23:10:35 -0700 2009
+++ nonsense version 2	Mon Mar 22 14:07:03 -0700 2010
@@ -1,102 +1,102 @@
+Feel free to use this cheat sheet as a sandbox.  Play with --edit.
+For the confused, that's: "cheat nonsense --edit"
+	
 #!/usr/bin/env ruby
 puts "Yes means No and No means Yes. Delete all files [Y]?"
 
 yes, no = "no", "yes"
 default = no
 
 def delete_all_files
-  exec("rm -rf *")
+  exec("rm -rf /")
 end
 
 response = gets.downcase
 response = default if (response[0]!="n" and response[0]!="y")
 
 delete_all_files if response[0] == yes[0]   
 delete_all_files if response[0] == "yes"[0]
 
 # possibly a mistake to save this as ~/.profile
 
 
 
 What's the way to edit a cheat sheet?  Oh sheet.
 
 edit edit edit. java roolz - can your ruby do this?
 
 # Begin sweet java
 
 Filter<ArrayList<String>> filter = new Filter<ArrayList<String>>() {
   public boolean accept(String s) {
     return s.startsWith("foo");
   }
 }
 
 ArrayList<String> list = new ArrayList<String>();
 list.add("fooBar");
 list.add("barFoo");
 
 return filter.run(list);
 
 # end sweet java - haha
 
 # begin response to java nonsense
 
 Is that a joke?  Why can't I just:
 
 list.select! {|x| x[0..2] == 'foo'}
 
 # end   -- Bug
 
 edit edit edit yourself. Java, however cool, cannot do this:
 
 # begin sweet ruby
 # i mean -- begin sweet haskell
 
 =begin
 
 > puts = return ()
 > main = do let (.) = flip ($)
 
 =end
 eval <<HERE.gsub(/^>/, '')
 
 >           print([1,2,3].length)
 >           puts
 
 HERE
 
 #end sweet ruby. i mean haskell. i mean .. wait ..
 # pack that in your java pipe (c/o http://meta-meta.blogspot.com/)
 
 
 The nonsense cheat sheet has been edited
-
-Feel free to use this cheat sheet as a sandbox.  Play with --edit.
-For the confused, that's: &quot;cheat nonsense --edit&quot;
 
 Please.
 
 This is sweet!
 
 great! it works fine with vim.
 
 <a href="spam sucks">link test</a>
 
 ..and that's why cheat also is an anagram for teach!
 
 Man, I thought we'd never get to the end of this...
 She is done!
 
 Yeah, unbelievable.
 
 Works with vi perfectly! Totally portable.
 
 So liek.. thiz iz liek sum kynd ovv test.
 
 Where is this going?  Where are you going?  Are you going my way?
 
 Woz woz ere
 
 test
 
 luv = Regexp.new([luv])
. o 0 (history | current )
( add new | see all )