I'm trying to write a CSV-compatible diff for git, using word-diff, so that I can see things like added columns easily.
In .gitattribues I've added:
*.csv diff=csv
And in .git/config I've added:
[diff "csv"]
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "mp3info" | |
| require "net/http" | |
| require 'cgi' | |
| require 'zlib' | |
| require 'stringio' | |
| require 'rexml/document' |
| // ==UserScript== | |
| // @name Google Maps Carbon | |
| // @namespace http://www.amee.com | |
| // @include http://maps.google.*/ | |
| // ==/UserScript== | |
| // Created by James Smith, AMEE - [email protected] | |
| // Public domain, do what you like :) | |
| // Once you've installed the greasemonkey script (click "raw" on the top |
| #!/usr/bin/env ruby | |
| # ArrayExt shows how to extend Array to support activerecord-style | |
| # filter chaining. | |
| class ArrayExt | |
| # When we create the ArrayExt, we store the actual array | |
| # we want to operate on internally | |
| def initialize(finder) |
| ESC="\033" # This is the escape sequence | |
| NO_COLOR="$ESC[0m" | |
| IRED="$ESC[1;31m" # ANSI color code for intense/bold red | |
| IGRN="$ESC[1;32m" # ANSI color code for intense/bold green | |
| # From http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/ | |
| # I had to change 'git-symbolic-ref' to 'git symbolic-ref' | |
| function parse_git_branch { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo " ["${ref#refs/heads/}"]" # I wanted my branch wrapped in [], use () or <> or whatever |
I'm trying to write a CSV-compatible diff for git, using word-diff, so that I can see things like added columns easily.
In .gitattribues I've added:
*.csv diff=csv
And in .git/config I've added:
[diff "csv"]
| 1234 | [email protected] | ||
|---|---|---|---|
| Alice | 5 | [email protected] |
I hereby claim:
To claim this, I am signing this object:
| @output = [] | |
| companyreader.each_with_index do |row, row_index| | |
| # Check the line has a postcode | |
| next if row['RegAddress.PostCode'].blank? | |
| postcode = Postcode(row['RegAddress.PostCode'],db) | |
| next unless postcode.current? | |
| lines = [row['RegAddress.AddressLine1'], row['RegAddress.AddressLine2'], row['RegAddress.PostTown'], row['RegAddress.County']] | |
| Verifying that +floppy76 is my blockchain ID. https://onename.com/floppy76 |
| const sectorOptions = [ | |
| 'academia', | |
| 'media', | |
| 'business', | |
| 'public-service', | |
| 'international', | |
| 'non-profit', | |
| ]; | |
| const expertiseOptions = [ |