Skip to content

Instantly share code, notes, and snippets.

@devarda
devarda / README.md
Last active August 11, 2019 00:11
Building PHP from source on Mac :: PHP 7.3.8 Compilation on macOS Mojave 10.14.5
@devarda
devarda / get minimum of object value in array.js
Created December 27, 2019 14:00
Neat one liner to get the minimum of [ {x:1}, {x:2}, {x:3} ]. Minimum of Array of Objects, specific key.
let arr = [ {x:1}, {x:2}, {x:3} ];
let min = Math.min.apply(Math, arr.map(o => o.x));
console.log('Minimum is", min);
@devarda
devarda / jquery.addrule.js
Created February 16, 2020 17:25 — forked from yckart/jquery.addrule.js
Add css-rules to an existing stylesheet - http://stackoverflow.com/a/16507264/1250044
/*!
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/11/23
**/