Source Code for Me (

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Selected Language:
Show Linenumbers:
Short link for Twitter:

HTML view:

Copy Source | Copy HTML
def write(location)
  path =
  raise "Location does not exist" unless path.exist?, "w") do |file|
    file_data =
    data = yield file
    return false if Digest::MD5.hexdigest(file_data) == data.hash
    file.puts YAML.dump(data)
  return true

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2017