This file contains hidden or 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
| ## Debounce helper for calling functions. | |
| ## | |
| ## This class creates a debounced version of the passed-in function `fn`. | |
| ## The debounced function will only be called after `delay` seconds have | |
| ## passed without any new calls to the function. | |
| ## | |
| ## [b]Usage Example:[/b] | |
| ## [codeblock] | |
| ## var debouncer: Debouncer | |
| ## |
This file contains hidden or 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
| ## A wrapper around AnimationTree to add a more intuitive API | |
| class_name AnimationTreePlus extends AnimationTree | |
| var _param_cache: Dictionary = {} | |
| func _ready() -> void: | |
| _scan_parameters() | |
| ## Scans the AnimationTree's properties and populates the parameter cache. | |
| ## This is called automatically in _ready(), but can be called again if parameters are changed at runtime. |
This file contains hidden or 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 trigger(el, eventType) { | |
| if (typeof eventType === 'string' && typeof el[eventType] === 'function') { | |
| el[eventType](); | |
| } else { | |
| const event = | |
| eventType === 'string' | |
| ? new Event(eventType, {bubbles: true}) | |
| : eventType; | |
| el.dispatchEvent(event); | |
| } |
This file contains hidden or 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 React, { useState } from 'react'; | |
| import RSC from 'react-scrollbars-custom'; | |
| export default ({ autoHide, children, ...props }) => { | |
| const [inUse, setInUse] = useState(); | |
| const style = { style: autoHide && { display: inUse ? null : 'none' }}; | |
| return <RSC | |
| trackXProps={style} | |
| trackYProps={style} |
This file contains hidden or 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 axios from 'axios'; | |
| axios.get('/popular') | |
| .then(res => { | |
| console.log(res.data); | |
| }); |
This file contains hidden or 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
| FROM node:alpine | |
| ENV NODE_ENV production | |
| ENV HOST 0.0.0.0 | |
| ENV PORT 80 | |
| ENV RAZZLE_CUSTOM_VARIABLE x | |
| # Bundle APP files | |
| COPY build . |
This file contains hidden or 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(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.XMPP=e()}}(function(){var e;return function e(t,n,r){function s(o,i){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!i&&c)return c(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return s(n?n:e)},u,u.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({"/stanza.io-8.0.2/index.js":[function(e,t,n){"use strict";n.VERSION="8.0.2",n.JID=e("xmpp-jid").JID,n.Client=e("./lib/client"),n.createClient=function(t){var r=new n.Client(t);return r.use(e("./lib/plugins")),r}},{"./lib/client":"/stanza.io-8.0.2/lib/client.js","./lib/plugins":"/stanza |
This file contains hidden or 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
| var graphics_card = function(){ | |
| var gl = document.createElement("canvas").getContext("experimental-webgl"); | |
| return gl.getParameter(gl.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL); | |
| } | |
| document.body.innerHTML = graphics_card(); |
This file contains hidden or 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
| /* line 1, ../threecss.sass */ | |
| tile { | |
| width: 32px; | |
| height: 32px; | |
| background-color: "#00ff00"; | |
| left: 20px; | |
| top: 50px; | |
| } | |
| /* line 5, ../threecss.sass */ |
This file contains hidden or 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
| distance = ( p1, p2 ) -> | |
| x = p2.x - p1.x | |
| y = p2.y - p1.y | |
| return Math.sqrt x*x + y*y |