Skip to content

Instantly share code, notes, and snippets.

View mtr's full-sized avatar

Martin Thorsen Ranang mtr

View GitHub Profile
@mtr
mtr / version_compare.js
Created January 27, 2016 20:00 — forked from TheDistantSea/version_compare.js
Function to compare two version strings (e.g. "1.6.1" is smaller than "1.7"). Developed in order to answer http://stackoverflow.com/a/6832721/50079.
/**
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
*
* This function was born in http://stackoverflow.com/a/6832721.
*
* @param {string} v1 The first version to be compared.
* @param {string} v2 The second version to be compared.
* @param {object} [options] Optional flags that affect comparison behavior:
* <ul>
* <li>
@mtr
mtr / .bithoundrc
Created December 17, 2015 00:29 — forked from bithoundio/.bithoundrc
The default values for .bithoundrc that customizes bitHound project analysis. If you like the defaults and want to make additions, keep the contents of this file and add your values. Commit this file directly to your project's root and bitHound will pick it up on the next round of analysis.
{
"ignore": [
"**/deps/**",
"**/node_modules/**",
"**/thirdparty/**",
"**/third_party/**",
"**/vendor/**",
"**/**-min-**",
"**/**-min.**",
"**/**.min.**",
### Keybase proof
I hereby claim:
* I am mtr on github.
* I am ranang (https://keybase.io/ranang) on keybase.
* I have a public key whose fingerprint is 3D36 64EF B03A BEC8 62B4 67F7 88A3 3655 A245 9474
To claim this, I am signing this object:
(function (window) {
var slice = [].slice;
window.ngWatchCount = function(base) {
var elems;
if (base && typeof base !== "string") {
elems = slice.call(base.querySelectorAll("*"));
elems.unshift(base);
} else if (typeof base === "string") {
elems = slice.call(document.querySelectorAll(base + ", " + base + " *"));
} else {
@mtr
mtr / SassMeister-input.scss
Created February 15, 2015 10:50
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
$sizes: (
small: (
height: 10px,
width: 20px
),
@mtr
mtr / SassMeister-input.scss
Created February 14, 2015 22:09
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
$sizes: (
small: (
height: 10px,
width: 20px
),