This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name EXAMPLE SCRIPT | |
// @version 0.9 | |
// @description This is an example showing Gist capability and how to auto update | |
// @author jbryson3 | |
// @match. https://www.google.com | |
// @grant none | |
// @updateURL https://gist.github.com/greglockwood/c39c9225a4b67f144703196f1959108a/raw/example.user.js | |
// @downloadURL https://gist.github.com/greglockwood/c39c9225a4b67f144703196f1959108a/raw/example.user.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function -strip-unit($num) { | |
@return $num / ($num * 0 + 1); | |
} | |
@function -convert-to-rem($value, $base-value) { | |
$value: -strip-unit($value) / -strip-unit($base-value) * 1rem; | |
@if ($value == 0rem) { $value: 0; } // Turn 0rem into 0 | |
@return $value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"foo": "abc", | |
"bar": 0 | |
}, | |
{ | |
"foo": "xyz", | |
"bar": 1 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************************* | |
Copyright (c) 2019, Greg Lockwood | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const print = (param, ...args) => { | |
console.log(param, ...args); | |
return param; | |
}; | |
const traceFn = (fn, context) => function () { | |
console.trace(`${fn.name} called with arguments: `, arguments); | |
return fn.apply(context || this, arguments); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module ng.grid { | |
interface GridOptions<T> { | |
columnDefs?: ColumnDef<T>[]; // Array of Column Definitions.. | |
groupHeaders?: boolean; // Whether to group the headers. Default is false. | |
headerHeight?: number; // Height, in pixels, of the header row. If not grouping headers, default is 25. If grouping headers, default is 50. | |
rowData?: T[]; // Data to be displayed as rows in the table | |
rowSelection?: string; // Type of row selection, set to either 'single' or 'multiple' to enable selection. | |
rowDeselection?: boolean; // Set to true or false (default is false). If true, then rows will be deselected if you hold down ctrl + click the row. | |
pinnedColumnCount?: number; // Number of columns to pin. Default is 0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg.on("mousemove", function() { | |
var x = d3.event.pageX - offsetLeft; | |
var beginning = x, end = pathLength, target; | |
while (true) { | |
target = Math.floor((beginning + end) / 2); | |
pos = pathEl.getPointAtLength(target); | |
pos.x += margin.left; | |
pos.y += margin.top; | |
if ((target === end || target === beginning) && pos.x !== x) { | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Quote demonstration | |
*/ | |
html { | |
min-height: 100%; | |
} | |
body { | |
background-image: linear-gradient(yellow, orange); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'IcoMoon'; | |
src: url('http://benfrain.com/downloads/IcoMoon.eot'); | |
src: url('http://benfrain.com/downloads/IcoMoon.eot?#iefix') format('embedded-opentype'), | |
url('http://benfrain.com/downloads/IcoMoon.svg#IcoMoon') format('svg'), | |
url('http://benfrain.com/downloads/IcoMoon.woff') format('woff'), | |
url('http://benfrain.com/downloads/IcoMoon.ttf') format('truetype'); | |
font-weight: normal; | |
font-style: normal; | |
} |
NewerOlder