SVN Diff While Ignoring Whitespace
Can be used in a directory:
$ dw
Or on a single file:
$ dw functions.php
alias dw="svn diff --diff-cmd diff -x -uw"
11381 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
alias dw="svn diff --diff-cmd diff -x -uw"
Index: vendor/plugins/token_generator/lib/token_generator.rb =================================================================== --- vendor/plugins/token_generator/lib/token_generator.rb (revision 1233) +++ vendor/plugins/token_generator/lib/token_generator.rb (working copy) @@ -1,7 +1,7 @@ module TokenGenerator def generate_token(size = 12, &validity) begin - token = Digest::MD5.hexdigest("#{inspect}#{Time.now}").first(size) + token = Digest::MD5.hexdigest("#{inspect}#{Time.now}#{rand}").first(size) end while !validity.call(token) if block_given?
patches/*.diffin your local directory, and apply them before restarting your app.
task :after_setup do patches_setup end task :after_update_code do send_and_apply_patches end task :patches_setup do run "mkdir -p #{deploy_to}/#{shared_dir}/patches" end task :send_and_apply_patches do Dir[File.join(File.dirname(__FILE__), '../patches/*.diff')].sort.each do |patch| puts "sending #{File.basename(patch)}" put(File.read(patch), "#{deploy_to}/#{shared_dir}/patches/#{File.basename(patch)}", :mode => 0777) puts "applying #{File.basename(patch)}" run "cd #{release_path}; patch -p0 < #{deploy_to}/#{shared_dir}/patches/#{File.basename(patch)}" end end
diff <dir1> <dir2>