Skip to content

Instantly share code, notes, and snippets.

@fensoft
fensoft / fix-grub.sh
Last active November 6, 2025 21:25
install ubuntu 22 64 bits on 32 bits EFI
copy https://github.com/hirotakaster/baytail-bootia32.efi/blob/master/bootia32.efi to /EFI/BOOT
after installing ubuntu:
sudo passwd ubuntu
sudo apt update
sudo apt install openssh-server
ssh to your computer, then:
sudo mount /dev/mmcblk1p2 /mnt
sudo mount --bind /dev /mnt/dev
@maciejpedzich
maciejpedzich / TableOfContents.astro
Last active August 25, 2025 06:07
Astro Table Of Contents Component + Sample Usage
---
import type { MarkdownHeading } from 'astro';
type Props = {
headings: MarkdownHeading[];
};
type HeadingWithSubheadings = MarkdownHeading & {
subheadings: MarkdownHeading[];
};
@guwidoe
guwidoe / GetLocalOneDrivePath.bas.vb
Last active November 15, 2025 15:13
VBA Function to get the local path of a OneDrive/SharePoint synchronized Microsoft Office file
'Attribute VB_Name = "OneDrivePathConversion"
'
' Cross-platform VBA Function to get the local path of OneDrive/SharePoint
' synchronized Microsoft Office files (Works on Windows and on macOS) and
' Cross-platform VBA Function to get the OneDrive/SharePoint Url path (link)
' from a local path of a locally synced folder (Works on Windows and on macOS)
'
' Author: Guido Witt-Dörring
' Created: 2022/07/01
' Updated: 2025/06/02
@ahmad-511
ahmad-511 / utils.js
Last active August 21, 2025 13:25
General JS utility functions
// #1 Select first matched element
export function $(selector, elem) {
elem = elem || document;
return elem.querySelector(selector);
}
// #2 Select all matched elements
export function $$(selector, elem) {
elem = elem || document;
return elem.querySelectorAll(selector);
@gitdagray
gitdagray / util.js
Last active August 21, 2025 13:23
Javascript Utility Functions
// Youtube tutorial here: https://youtu.be/LDgPTw6tePk
// These functions are designed to be exported, but you could create a class instead. See tutorial video.
// #1 proper case
export const properCase = (string) => {
return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`;
};
@leoplan2
leoplan2 / install_apk_ish.sh
Created October 23, 2020 16:40
Install apk on iSH (App Store version)
#!/bin/bash
wget http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86/apk-tools-static-2.10.5-r1.apk
tar xf apk-tools-static-2.10.5-r1.apk sbin/apk.static
./sbin/apk.static add apk-tools
# Thanks to https://github.com/ish-app/ish/wiki/Installing-apk-on-the-App-Store-Version
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active November 20, 2025 12:39
Building a react native app in WSL2
const deepCopyFunction = (inObject) => {
let outObject, value, key
if (typeof inObject !== "object" || inObject === null) {
return inObject // Return the value if inObject is not an object
}
// Create an array or object to hold the values
outObject = Array.isArray(inObject) ? [] : {}
@pyRobShrk
pyRobShrk / interp2d.bas
Created November 30, 2017 23:58
Excel UDF for bilinear interpolation
Function Int2d(rowLookup As Double, colLookup As Double, lookupRange As Range) As Double
'This function performs 2 dimensional linear interpolation using built-in linear functions
'Lookup range includes column and row lookup values
Dim Row, col As Integer
Dim RowVals, ColVals, lookup As Variant
Dim sl1, sl2, sl3, int1, int2, int3, col1, col2 As Double
Row = 1
col = Row
On Error Resume Next
Row = WorksheetFunction.Match(rowLookup, lookupRange.Offset(1, 0).Columns(1), 1)
@rahilwazir
rahilwazir / vmdk_vhdx.md
Last active September 25, 2025 10:46
Convert VMWare to Hyper-V (vmdk to vhdx)