Skip to content

Instantly share code, notes, and snippets.

View sploders101's full-sized avatar

Shaun Keys sploders101

View GitHub Profile
@sploders101
sploders101 / events.d.ts
Last active October 30, 2019 16:01
Muuri 0.8.0 types
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;
@sploders101
sploders101 / fileDrop.vue
Last active September 17, 2023 15:25
Vuetify file drop box (drag-n-drop enabled, no directory support, uses vuetify-loader)
<template>
<!-- Drop box -->
<div class="dropzone"
@dragover.prevent
@dragleave="dragleave"
@dragenter="dragenter"
@drop="drop"
ref="dropzone"
>
<!-- Box Label -->
@sploders101
sploders101 / netmask.js
Created December 29, 2018 22:47
Simple functions for performing netmask checks on an IP.
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;
}