Skip to content

Instantly share code, notes, and snippets.

import { BunFile, NetworkSink, S3Client, S3File, S3FilePresignOptions, S3Options, S3Stats } from 'bun';
import path from 'path/posix';
type AlfrescoOptions = S3Options & { shareUrl: string }
type AlfrescoFilePresignOptions = S3FilePresignOptions & { fileName: string; shareId: string }
type AlfrescoWriteOptions = S3Options & { parentId: string }
dmxlc3M6Ly9jYjZlNTk1Mi1lNjYyLTQ1OGYtYTMyYy1mYjI1ZmE0MDE0YThAMTA0LjMxLjE2LjY1Ojg0NDM/c2VjdXJpdHk9dGxzJnNuaT1jaC5kb25hbGR2cG4uc2JzJnR5cGU9Z3JwYyZhbHBuPWgyLGh0dHAvMS4xI/CflJIgVkwtR1JQQy1UTFMg8J+PtOKAjeKYoO+4jyBOQS0xMDQuMzEuMTYuNjU6ODQ0Mw==
@mattmattox
mattmattox / harvester-lh-vol-1.sh
Created February 7, 2025 20:14
harvester-lh-vol-1.sh
#!/bin/bash
volume_names=$(kubectl -n longhorn-system get volumes.longhorn.io -o json | jq -r '.items[] | .metadata.name')
for volume_name in $volume_names;
do
echo "############################################################################################################################"
echo -n "numberOfReplicas "
kubectl -n longhorn-system patch volumes.longhorn.io $volume_name --type='merge' -p '{"spec":{"numberOfReplicas":1}}';
@Schoolads
Schoolads / gist:b3a9a6caf058a0a6053598522f9ce04d
Created February 7, 2025 20:14
College of Nursing Sciences, Babura, Jigawa State 2025/2026 Admission Form Or Application Form is out NOW Call 08125777035 DR ALICE OGUNSOLA For More Details On How to Buy The Form and register Online.Also 2025/2026 POST BASIC NURSING FORM,GENERAL/REGISTER NURSING FORM,PERIOPERATIVE NURSING FORM,PSYCHIATRIC NURSING FORM And BASIC NURSING And Bas…
College of Nursing Sciences, Babura, Jigawa State 2025/2026 Admission Form Or Application Form is out NOW Call 08125777035 DR ALICE OGUNSOLA For More Details On How to Buy The Form and register Online.Also 2025/2026 POST BASIC NURSING FORM,GENERAL/REGISTER NURSING FORM,PERIOPERATIVE NURSING FORM,PSYCHIATRIC NURSING FORM And BASIC NURSING And Basic Midwifery Form Are Still Ongoing.
export function throttle<A extends any[], T>(
fn: (...args: A) => T,
ms: number,
): (...args: A) => T | void {
let last = 0;
let timeout: any;
return function throttled(...args: A): T | void {
const now = Date.now();
const elapsed = now - last;
if (elapsed < ms) {
@FrankyJo
FrankyJo / gist:5133a81e0ca46a7209a74aa641199bde
Last active February 7, 2025 20:44
Can see from which hosts are allowed to connect to DB for 'user_name' and change privileges
SELECT user, host FROM mysql.user WHERE user = 'user_name';
GRANT ALL PRIVILEGES ON your_database.* TO 'user_name'@'%' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
[
{
"animeEng": "High School! Kimengumi",
"animeRomaji": "High School! Kimengumi",
"songName": "Abunai Sa・Ka・Na",
"artist": "Ushiroyubi Sasaregumi",
"type": "Insert Song",
"correctCount": 9,
"startTime": 103,
"songDuration": 131.0135,
@verlyn13
verlyn13 / USBMonitor.java
Created February 7, 2025 20:13
USBMonitor class, part of the libuvc module
/*
* UVCCamera
* library and sample to access to UVC web camera on non-rooted Android device
*
* Copyright (c) 2014-2017 saki t_saki@serenegiant.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
<cfscript>
strUserRoles = {
isAdmin : 0, // admin
isFM : 0, // facility Manager
isRC : 0, // rotation contact
}
theRole = StructFindValue( strUserRoles, "1", "one" );
</cfscript>
<cfscript>
strUserRoles = {
isAdmin : 0, // admin
isFM : 0, // facility Manager
isRC : 0, // rotation contact
none : 1
}
theRole = StructFindValue( strUserRoles, "1", "one" );
</cfscript>