Find the most recently changed files (recursively)
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
11377 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
#!/usr/bin/ruby # Quick and dirty template processing script. It takes # as an argument the name of the first template script # and then executes it to standard output. require "erb" class QuickTemplate attr_reader :args, :text def initialize(file) @text = File.read(file) end def exec(args={}) b = binding template = ERB.new(@text, 0, "%<>") result = template.result(b) # Chomp the trailing newline result.gsub(/\n$/,'') end end def erb(file, args={}) QuickTemplate.new(file).exec(args) end puts erb(ARGV[0])
ruby erb_run.rb main.thtml
<html> <head> </head> <div> <%= erb("title.thtml") %> </div> </html>
<title> This is Alex's cool restraunt</title>