https://github.com/mohanson/gameboy - gameboy emulator
https://github.com/JakeStanger/mpd-discord-rpc - discordrpc for mpd
https://github.com/spieglt/nestur - nes emulator
https://github.com/cristicbz/rust-doom - doom renderer
https://github.com/Aloxaf/silicon - a tool for creating pretty images of your source code for sharing
https://github.com/Rigellute/spotify-tui - a tui for spotify
https://github.com/atanunq/viu - view images in the terminal
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
| const routes = { | |
| auth: { | |
| login: "/auth/login", | |
| reset: "/auth/reset-password" | |
| }, | |
| apply: { | |
| documents: "/apply/upload-docs", | |
| income: "/apply/income", | |
| name: "/apply/name", | |
| review: "/apply/review", |
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
| const path = require('path'); | |
| module.exports = class EmitAllPlugin { | |
| constructor(opts = {}) { | |
| this.ignorePattern = opts.ignorePattern || /node_modules/; | |
| } | |
| shouldIgnore(path) { | |
| return this.ignorePattern.test(path); | |
| } |
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
| /** | |
| * | |
| * @param {string} remote - the remote global name | |
| * @param {object | string} shareScope - the shareScope Object OR scope key | |
| * @param {string} remoteFallbackUrl - fallback url for remote module | |
| * @returns {Promise<object>} - Federated Module Container | |
| */ | |
| const getOrLoadRemote = (remote, shareScope, remoteFallbackUrl = undefined) => | |
| new Promise((resolve, reject) => { | |
| // check if remote exists on window |
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 devices = [ | |
| { name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' }, | |
| { name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' }, | |
| { name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' }, | |
| { name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' }, |
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 devices = [ | |
| { name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' }, | |
| { name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' }, | |
| { name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' }, | |
| { name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' }, |
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
| global | |
| #debug # uncomment to enable debug mode for HAProxy | |
| defaults | |
| mode http # enable http mode which gives of layer 7 filtering | |
| timeout connect 5000ms # max time to wait for a connection attempt to a server to succeed | |
| timeout client 50000ms # max inactivity time on the client side | |
| timeout server 50000ms # max inactivity time on the server side | |
| backend legacy # define a group of backend servers to handle legacy requests |
%GetOptimizationStatus return a set of bitwise flags instead of a single value,
to access the value, you need to take the binary representation of the returned value.
Now, for example, if 65 is returned, the binary representation is the following:
(65).toString(2).padStart(12, '0');
// 000001000001Each binary digit acts as a boolean with the following meaning:
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
| export class ExpireMap extends Map { | |
| expiring = new Map() | |
| constructor(private _millis: number, private _getTime = this._getTime) { | |
| super() | |
| } | |
| public set<T, V>(key: T, value: V): V { | |
| const expire = this.getTime() + this._millis | |
| this.expiring.set(key, expire) | |
| super.set(key, value) |
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
| export class LRU extends Map { | |
| constructor(private max: number) { | |
| super(); | |
| } | |
| /** | |
| * Attemps to retrieve a value from the cache | |
| * @param key The key of the entry to return from the cache | |
| * @returns the value associated to the input key or undefined | |
| */ |