Michael M. upgrading...
dupdraded
Jack C. i dont feel any different
Michael M. it takes a minute to propagate to NJ
Winter L. has left the room
# gem install thin | |
# gem install rack | |
# thin -R static.ru start | |
# The static content rooted in the current working directory | |
# Dir.pwd => http://localhost:3000/ | |
# | |
root=Dir.pwd | |
puts ">>> Serving: #{root}" |
# This function cleans up messy HTML that was pasted by a user to a WYSIWYG editor. | |
# Specifically it also handles messy Word\Outlook generated HTML while keeping its original formattings. | |
require 'rubygems' | |
require 'sanitize' | |
def clean_up_document(html) | |
elements = %w[p b h1 h2 h3 h4 h5 h6 strong li ul ol i br div pre p] | |
attributes = { | |
'a' => ['href', 'title'], |
require 'fileutils' | |
@files = Dir.glob('/Users/BobW/desktop/test/*/*') | |
@files.each do |file| | |
FileUtils.mv(file, '/Users/BobW/desktop/test2') | |
end |
YUI_JAR = File.dirname(__FILE__) + "/../tools/yuicompressor-2.4.2.jar" | |
class YuiCompressor < Nanoc3::Filter | |
identifier :yui_compress | |
type :text => :binary | |
def run(content, params={}) | |
type = type_from_extension | |
cmd = "java -jar #{YUI_JAR} --type #{type} -o #{output_filename}" | |
IO.popen(cmd, 'w') { |f| f.write(content) } | |
raise "yuicompressor exited with #{$?} for '#{cmd}'" unless $? == 0 |
Michael M. upgrading...
dupdraded
Jack C. i dont feel any different
Michael M. it takes a minute to propagate to NJ
Winter L. has left the room
require 'net/http' | |
require 'yaml' | |
files = YAML.load_file("image_list.yml") | |
i = 1 | |
files.each do |file| | |
# use root url without protocol | |
response = Net::HTTP.start("farm5.static.flickr.com") do |http| | |
http.get("#{file}") | |
end | |
puts "#{response}" |
%style{:type=>"text/css"} | |
:sass | |
#myCustomElement | |
background: ##{current_user.color} | |
background = "-webkit-gradient(linear, left top, left bottom, from(##{current_user.color}), to(" + (##{current_user.color} - #222) + "))" |
alias fuckit="git add . && git commit -m 'Throwaway commit' && git reset --hard HEAD^" |
<div id='container'> | |
<!-- all your normal page content goes in here --> | |
</div> |
# MacPorts Installer addition on 2008-12-17_at_17:36:30: adding an appropriate PATH variable for use with MacPorts. | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
# MacPorts Installer addition on 2008-12-17_at_17:36:30: adding an appropriate MANPATH variable for use with MacPorts. | |
export MANPATH=/opt/local/share/man:$MANPATH | |
# Finished adapting your MANPATH environment variable for use with MacPorts. | |
# Setting PATH for MacPython 2.6 |