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
drawUnits: function( dirtyRect ) { | |
var ressources = this.ressources; | |
var zones = ressources.game.zones; | |
var sprites = ressources.sprites; | |
var bufferContext = this.bufferContext; | |
bufferContext.save(); | |
if (dirtyRect) { | |
this.setClipping( dirtyRect ); |
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
decode.ip6_header = function(raw_packet, next_header, ip, offset) { | |
switch (next_header) { | |
case 1: | |
ip.protocol_name = "ICMP"; | |
ip.icmp = decode.icmp(raw_packet, offset); | |
break; | |
case 2: | |
ip.protocol_name = "IGMP"; | |
ip.igmp = decode.igmp(raw_packet, offset); | |
break; |
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
/*! | |
* socket.io-node | |
* Copyright(c) 2011 LearnBoost <[email protected]> | |
* MIT Licensed | |
*/ | |
/** | |
* Module dependencies. | |
*/ |
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
Manager.prototype.onClientDisconnect = function (id, reason) { | |
for (var name in this.namespaces) { | |
if (this.roomClients[id][name]) { | |
this.namespaces[name].handleDisconnect(id, reason); | |
} | |
} | |
this.onDisconnect(id); | |
}; |
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
23 Jul 15:46:36 - The onerror handler | |
on target | |
{ frames: [ [Circular] ], | |
contentWindow: [Circular], | |
window: [Circular], | |
self: [Circular], | |
location: [Getter/Setter], | |
addEventListener: [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
WEBVTT FILE | |
1 | |
00:00:00.500 --> 00:00:02.000 D:vertical A:start | |
The Web is always changing | |
2 | |
00:00:02.500 --> 00:00:04.300 | |
and the way we access it is changing |
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
# Configuration | |
# Track to be used to calculate duration | |
videoTrack = 1 | |
# Clip color to filter for; empty is default | |
filterColor = "" | |
# Frames per second used | |
fps = 60 | |
from datetime import timedelta |
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 vitePlugin() { | |
const virtualModuleDependency = 'virtual-module-conf.json'; | |
const virtualModuleId = 'virtual:module'; | |
const resolveVirtualId = (id) => '\0' + id; | |
let virtualModuleContent; | |
async function refreshVirtualModuleContent(reader) { | |
const json = JSON.parse(await reader()); | |
virtualModuleContent = `export default ${JSON.stringify(json.value)};`; | |
} |
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 { z } from 'zod'; | |
// If you feel zod-form-data is too bulky for what | |
// you're trying to do, try this: | |
export const zfd = <T extends z.ZodRawShape>(shape: T) => { | |
return z.custom<FormData>().transform( | |
(fd) => Object.fromEntries( | |
fd.entries() as IterableIterator<[string, string]> | |
) | |
).pipe(z.object(shape)); |
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
// Grabs a given list of properties from an | |
// object and returns a new "shrunk" object | |
// with just those properties while preserving | |
// correct typing. | |
function grab< | |
O extends { [x in A[number]]: unknown }, | |
const A extends string[] | |
>(o: O, properties: A): { | |
[x in A[number]]: typeof o[x] | |
} { |