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
/* eslint-disable @typescript-eslint/unified-signatures */ | |
/* eslint-disable @typescript-eslint/naming-convention */ | |
interface ZendeskWidgetCommander { | |
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#clear */ | |
(type: 'webWidget', command: 'clear'): void; | |
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#close */ | |
(type: 'webWidget', command: 'close'): void; | |
/** @see https://developer.zendesk.com/embeddables/docs/widget/core#get-display */ |
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
let to_js_boolean b => if b { Js.true_ } else { Js.false_ }; | |
let optionMap fn opt_value => switch opt_value { | |
| None => None | |
| Some value => Some (fn value) | |
}; | |
module View = { | |
external view : ReactRe.reactClass = "View" [@@bs.module "react-native"]; | |
let createElement | |
accessible::(accessible:option bool)=? |
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
import { Component, PropTypes } from 'react'; | |
function toCssKey(key) { | |
return `--${key}`; | |
} | |
export default class CssVariablesProvider extends Component { | |
static propTypes = { | |
variables: PropTypes.objectOf(PropTypes.string).isRequired, | |
children: PropTypes.element.isRequired, |
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 "rx" { | |
declare interface IPromise<T> { | |
then<R>( | |
onFulfilled: ( | |
value: T | |
) => IPromise<R>, | |
onRejected: ( | |
reason: any | |
) => IPromise<R> | |
): IPromise<R>; |
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
import Immutable from 'immutable'; | |
const { Record } = Immutable; | |
declare class ImmEulerRecordClass extends Record { | |
x: number; | |
y: number; | |
z: number; | |
order: string; | |
} |
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
// replace `CustomError` with the name of your error | |
// replace `ParentError` with the superclass, even if it is `Error` or another native error. | |
// other arguments besides `message` can be added, but at least `message` should exist. | |
var CustomError = (function (ParentError) { | |
function CustomError(message) { | |
var self = this instanceof CustomError ? this : Object.create(CustomError.prototype); | |
var err = ParentError.call(self, message); | |
self.message = message; | |
if (typeof Error.captureStackTrace === 'function') { |
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
// such new game in Flappy Doge | |
// http://www.dogetek.co/game/ | |
// plz developer tools in chrome | |
// much paste in console | |
// move mouse expert | |
(function () { | |
var pos = null; | |
$(window).mousemove(function (e) { |
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(){ | |
var oldPrint = window.print; | |
var slice = Array.prototype.slice; | |
window.print = function () { | |
if (typeof window.onbeforeprint === "function") { | |
window.onbeforeprint.apply(this, slice.call(arguments)); | |
} | |
oldPrint.apply(this, slice.call(arguments)); | |
if (typeof window.onafterprint === "function") { |
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
try { | |
if (typeof top === "object" && top !== null && typeof top.opener === "object" && top.opener !== null && !top.opener._$jscoverage) { | |
top.opener._$jscoverage = {}; | |
} | |
} catch (e) {} | |
try { | |
if (typeof top === "object" && top !== null) { | |
try { | |
if (typeof top.opener === "object" && top.opener !== null && top.opener._$jscoverage) { | |
top._$jscoverage = top.opener._$jscoverage; |
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 chunk(array, length) { | |
var chunked = []; | |
for (var i = 0, len = array.length; i < len; i += length) { | |
chunked.push(array.slice(i, i + length)); | |
} | |
return chunked; | |
}; |
NewerOlder