I hereby claim:
- I am jordanforeman on github.
- I am jordanforeman (https://keybase.io/jordanforeman) on keybase.
- I have a public key whose fingerprint is 1B74 016D 06FD 4CA1 82CD 70D4 851A 4889 2A34 D49C
To claim this, I am signing this object:
| var RGB = function(r, g, b){ | |
| this.r = r; | |
| this.g = g; | |
| this.b = b; | |
| }; | |
| RGB.prototype.toString = function(){ |
| // Responsive JavaScript Helpers | |
| /* CONSTANTS HOLDER */ | |
| var ScaleDirection = { | |
| SCALE_UP : "UP", | |
| SCALE_DOWN : "DOWN" | |
| }; | |
| /* RESPONDER CLASS */ |
| /* These numbers are all arbitrary; feel free to tweak them to your liking/needs */ | |
| $mobileBreakpoint: 360px; | |
| $tableBreakpoint: 720px; | |
| $desktopBreakpoint: 1080px; | |
| @mixin breakpoint($bp) { | |
| /* Use min-width for a progressive-enhancement approach */ | |
| @media screen and (min-width: $bp) { @content } | |
| } |
| EventDispatcher = { | |
| events: {}, | |
| on: function(event, callback) { | |
| var handlers = this.events[event] || []; | |
| handlers.push(callback); | |
| this.events[event] = handlers; | |
| }, |
I hereby claim:
To claim this, I am signing this object:
| namespace HM\REST_API; | |
| class REST_API { | |
| } | |
| new REST_API(); |
| namespace HM\REST_API; | |
| class REST_API { | |
| public function __construct() { | |
| add_action('rest_api_init', array($this, 'register_routes')); | |
| } | |
| public function register_routes() { | |
| $api_namespace = 'hm/v1'; |
| namespace HM\REST_API; | |
| class REST_API { | |
| public function __construct() { | |
| add_action('rest_api_init', array($this, 'register_routes')); | |
| } | |
| public function register_routes() { |
| /** | |
| * Measures a canvas and splits lines of text so that they fit within the width thereof. | |
| * Requires some text styling to be applied to the canvasContext already, and will not function as expected if that is changed between calculation and drawing of returned lines | |
| * | |
| * @param canvas - <canvas> | |
| * @param text - String the text to measure and break up | |
| * @param padding - the horizontal padding to take into account (assumes left/right padding are equivalent) | |
| * | |
| * @returns [Array] - an array containing lines of text that, when rendered on the canvas will not exceed the canvas' width | |
| */ |