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
#ifndef THROTTLE_H | |
#define THROTTLE_H | |
#include <stdint.h> | |
#include <stdbool.h> | |
uintptr_t THROTTLE_CallbackEnqueue(uint32_t timeout, void (*timerCallback)()); | |
uint32_t THROTTLE_ReadTime(); |
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
# Spaceship configuration | |
SPACESHIP_PROMPT_ORDER=( | |
user # Username section | |
host # Hostname section | |
dir # Current directory section | |
git # Git section (git_branch + git_status) | |
hg # Mercurial section (hg_branch + hg_status) | |
package # Package version | |
node # Node.js section | |
ruby # Ruby section |
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 { MutableRefObject, useCallback, useRef } from 'react'; | |
export type Callback<T extends any[]> = (...args: T) => void; | |
export interface ICallbackTimingOptions<T extends any[]> { | |
singleCallback?: Callback<T>; | |
} | |
export function useCallbackTimingSequence<T extends any[]>( | |
callback: Callback<T>, |
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 */ | |
const path = require('path'); | |
const fs = require('fs-extra'); | |
const md5File = require('md5-file'); | |
class Postprocessor { | |
constructor(options) { |
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 MILISECONDS_IN_A_DAY = 1000 * 60 * 60 * 24; | |
const getDaysInMonth = (month, year = (new Date()).getFullYear()) => { | |
return new Date(year, month + 1, 0).getDate(); | |
} | |
const getMonday = (d) => { | |
const parsedDate = new Date(d); | |
const day = parsedDate.getDay(); | |
const difference = parsedDate.getDate() - day + (day == 0 ? -6 : 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
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
try { | |
eval(str); | |
} catch(e) { | |
alert('Your browser does not support ES6!') | |
} |
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
var elems = document.querySelectorAll('.element-selector'); | |
window.addEventListener('resize', function(e) { | |
elems.forEach(function(elem){ | |
elem.clientHeight = window.innerHeight; | |
}); | |
}); |