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 IPBInt(ip) { | |
const iparr = ip.split("."); | |
let bip = 0n; | |
for(let i=0;i<iparr.length;i++) { | |
bip = bip << 8n; | |
bip += BigInt(iparr[i]); | |
} | |
return bip; | |
} |
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
<template> | |
<!-- Drop box --> | |
<div class="dropzone" | |
@dragover.prevent | |
@dragleave="dragleave" | |
@dragenter="dragenter" | |
@drop="drop" | |
ref="dropzone" | |
> | |
<!-- Box Label --> |
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 Item from "./item"; | |
import Muuri from "."; | |
// Type this!!! | |
export type DraggerEvent = any; | |
export interface EventListeners { | |
synchronize(): any; | |
layoutStart(items: Item[]): any; | |
layoutEnd(items: Item[]): any; |
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
<template> | |
<div> | |
<v-text-field | |
v-model="syncVal" | |
> | |
<template slot="append"> | |
<v-tooltip top> | |
<template v-slot:activator="{ on }"> | |
<v-btn | |
v-on="on" |
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 rand = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); | |
type CSValue = CSLiteral | CSRef; | |
type CSLiteral = string | number | boolean | null; | |
type CSRef = [string]; | |
export function analyzeRefs(obj: any) { | |
const reference = new Map<object | any[], string>(); | |
// Build reference table |
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 downloadString(str, name) { | |
const elem = document.createElement("a"); | |
elem.href = URL.createObjectURL(new Blob([str])); | |
elem.download = name; | |
elem.click(); | |
} |
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
<template> | |
<div | |
ref="muuriel" | |
class="muuri" | |
> | |
<div | |
class="muuri-item" | |
v-for="field in value" | |
:muurikey="field[muurikey]" |
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 http from "http"; | |
import https from "https"; | |
import { | |
AddressInfo, | |
} from "net"; | |
import { URL } from "url"; | |
const updateServer = "https://updates.yourserver.com/path/to/update/dir/without/trailing/slash"; | |
const updateAuth = `Basic ${Buffer.from("username:password").toString("base64")}` |
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 { | |
Readable, | |
} from "stream"; | |
export interface SpliceEntry { | |
size: number; | |
stream: Readable | Buffer; | |
} | |
export class StreamSplicer extends Readable { |
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
[colors.bright] | |
black = "0x7f7f7f" | |
blue = "0x5c5cff" | |
cyan = "0x00ffff" | |
green = "0x00ff00" | |
magenta = "0xff00ff" | |
red = "0xff0000" | |
white = "0xffffff" | |
yellow = "0xffff00" |
OlderNewer