Skip to content

Instantly share code, notes, and snippets.

View mkubdev's full-sized avatar
🌶️

Maxime Kubik mkubdev

🌶️
View GitHub Profile
@ektogamat
ektogamat / Forest.jsx
Last active June 17, 2025 21:15
A simple FakeForest Component for React Three Fiber by Anderson Mancini
/*
Copyright(c) June 2024 Anderson Mancini
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@huytd
huytd / wordle.md
Last active November 21, 2025 07:17
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@timothycarambat
timothycarambat / index.html
Created December 31, 2021 02:05
Login with ETH and show account NFTs using the OpenSea API
<head>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
</head>
<body class="h-full">
<div class="
flex
w-full
mt-40
mb-10
@vistafan12
vistafan12 / rafisskins.md
Last active March 27, 2025 17:11
Rafis Skins Official
@larsneo
larsneo / viewer.html
Last active May 21, 2025 17:22 — forked from jsprpalm/viewer.html
Pinch zoom implementation for PDF.js viewer
<!-- Goes into viewer.html just before ending </body> -->
<script>
let pinchZoomEnabled = false;
function enablePinchZoom(pdfViewer) {
let startX = 0, startY = 0;
let initialPinchDistance = 0;
let pinchScale = 1;
const viewer = document.getElementById("viewer");
const container = document.getElementById("viewerContainer");
const reset = () => { startX = startY = initialPinchDistance = 0; pinchScale = 1; };
@jsprpalm
jsprpalm / viewer.html
Created May 23, 2019 12:25
Pinch zoom implementation for PDF.js viewer
<!-- Goes into viewer.html just before ending </body> -->
<script>
let pinchZoomEnabled = false;
function enablePinchZoom(pdfViewer) {
let startX = 0, startY = 0;
let initialPinchDistance = 0;
let pinchScale = 1;
const viewer = document.getElementById("viewer");
const container = document.getElementById("viewerContainer");
const reset = () => { startX = startY = initialPinchDistance = 0; pinchScale = 1; };
@sampathsris
sampathsris / passport-ntlm-ad.js
Created August 16, 2018 04:12
Windows integrated authentication with Passport.js in pure JavaScript (without using IISNode or mod_auth_sspi).
const express = require('express');
const session = require('express-session');
const passport = require('passport');
const ntlm = require('express-ntlm');
const ActiveDirectory = require('activedirectory');
const CustomStrategy = require('passport-custom');
const PORT = process.env.PORT || 8080;
const adconfig = {
@djabif
djabif / slugify.pipe.ts
Last active July 18, 2025 09:54
Angular Pipe to transform a string into a slug
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'slugify'})
export class SlugifyPipe implements PipeTransform {
transform(input: string): string {
return input.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
@martinvirtel
martinvirtel / krpano-to-marzipano.config
Last active May 2, 2023 19:28
Generate tile files for marzipano.net panorama viewer with krpanotools from krpano.com
# Generate tile files that can be used with https://www.marzipano.net
# This is a config file for https://krpano.com/tools/kmakemultires/config/ -
flash=false
html=false
xml=false
panotype=autodetect
tilesize=512
@nolanlawson
nolanlawson / index.html
Last active December 5, 2023 07:14 — forked from bemson/index.html
Web Worker via blob URL
<!doctype html>
<html lang="en">
<body>
<span id="output"></span>
</body>
<script>
(function () {
var workerBlob = new Blob(
[workerRunner.toString().replace(/^function .+\{?|\}$/g, '')],
{ type:'text/javascript' }