One way of many...
This is one way which keeps the history looking like you'd expect.
Command is equivalent to git checkout MINE; git merge -s theirs HERS.
| require 'md5' | |
| class Chargify::HooksController < ApplicationController | |
| protect_from_forgery :except => :dispatch | |
| before_filter :verify, :only => :dispatch | |
| EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze | |
| def dispatch | |
| event = params[:event] |
| @mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
| @if $inset { | |
| -webkit-box-shadow:inset $top $left $blur $color; | |
| -moz-box-shadow:inset $top $left $blur $color; | |
| box-shadow:inset $top $left $blur $color; | |
| } @else { | |
| -webkit-box-shadow: $top $left $blur $color; | |
| -moz-box-shadow: $top $left $blur $color; | |
| box-shadow: $top $left $blur $color; | |
| } |
| function interval(duration, fn){ | |
| var _this = this | |
| this.baseline = undefined | |
| this.run = function(){ | |
| if(_this.baseline === undefined){ | |
| _this.baseline = new Date().getTime() | |
| } | |
| fn() | |
| var end = new Date().getTime() |
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
| var Complex = function(real, imag) { | |
| if (!(this instanceof Complex)) { | |
| return new Complex (real, imag); | |
| } | |
| if (typeof real === "string" && imag == null) { | |
| return Complex.parse (real); | |
| } | |
| this.real = Number(real) || 0; |
| // Represents an edge from source to sink with capacity | |
| var Edge = function(source, sink, capacity) { | |
| this.source = source; | |
| this.sink = sink; | |
| this.capacity = capacity; | |
| }; | |
| // Main class to manage the network | |
| var Graph = function() { | |
| this.edges = {}; |
| http://jsfiddle.net/GuQaV/show/ |
(The below text is licensed with CC0, which means that if you want to use or translate it, that is OK by me.)
Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺
Locally, I'm at this commit:
$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>
Date: Sun Apr 15 16:35:03 2012 +0200
| license: gpl-3.0 | |
| redirect: https://beta.observablehq.com/@mbostock/d3-pie-chart |