Original source can be found on StackOverflow.
A being the first commit:
git rebase -i A
It is possible to start like that if you continue with edit rather than squash:
edit e97a17b B
pick asd314f C
/* ========================================================================== | |
Cached 'Functional' patterned mixin, using curry to invoke config parameters. | |
===========================================================================*/ | |
// Create curry prototype; | |
Function.prototype.curry = function(){ | |
var slice = Array.prototype.slice, | |
args = slice.apply(arguments), | |
that = this; | |
// Some doc | |
// Walkthrough https://medium.com/the-javascript-collection/ce6da2d324fe | |
// 'arguments' native variable: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments | |
var curry = function(fn){ | |
var args = Array.prototype.slice.call(arguments, 1); | |
return function(){ | |
return fn.apply(this, args.concat( | |
Array.prototype.slice.call(arguments, 0))); | |
}; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Extending an example BaseClass, using prototype, underscore and mixins." /> | |
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> | |
<script src="http://jashkenas.github.io/underscore/underscore-min.js"></script> | |
<script src="http://jashkenas.github.io/backbone/backbone-min.js"></script> | |
<link href="http://code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> |
<div x-pagination=""> | |
<div class="previous">Previous</div> | |
<div class="items-container"></div> | |
<div class="next">Next</div> | |
</div> |
var test = null; | |
function NumberException(message){ | |
this.name = 'NumberException'; | |
this.message = message | |
} | |
function isPositiveNumber(num) { | |
if (typeof num !== 'number') | |
throw new NumberException('Value entered is not a number'); |
function namespace(namespaceString) { | |
var parts = namespaceString.split('.'), | |
parent = window, | |
currentPart = ''; | |
for(var i = 0, length = parts.length; i < length; i++) { | |
currentPart = parts[i]; | |
parent[currentPart] = parent[currentPart] || {}; | |
parent = parent[currentPart]; | |
} |
function Podcast(title, url) { | |
// Forces the new instance so that 'this' has context inside Podcast | |
if(false === (this instanceof Podcast)) { | |
return new Podcast(title, url); | |
} | |
this.title = title; | |
this.url = url; | |
this.toString = function() { |
Original source can be found on StackOverflow.
A being the first commit:
git rebase -i A
It is possible to start like that if you continue with edit rather than squash:
edit e97a17b B
pick asd314f C
// Sourced from: http://css-tricks.com/centering-in-the-unknown/ | |
@mixin element-align-center($child-element, $width-of-child) { | |
& { | |
vertical-align: middle; | |
display:inline-block; | |
} | |
&:before { | |
content: ""; | |
display: inline-block; | |
height: 100%; |
/* YUI inline-block grid solution */ | |
.yui3-g { | |
letter-spacing: -0.31em; /* Webkit: collapse white-space between units */ | |
*letter-spacing: normal; /* reset IE < 8 */ | |
*word-spacing: -0.43em; /* IE < 8: collapse white-space between units */ | |
text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */ | |
} | |
.yui3-u { | |
display: inline-block; |