Skip to content

Instantly share code, notes, and snippets.

@fensoft
fensoft / fix-grub.sh
Last active March 14, 2026 11:35
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
@guwidoe
guwidoe / GetLocalOneDrivePath.bas.vb
Last active July 7, 2026 07:47
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: 2026/01/16
@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 June 11, 2026 03:38
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 July 6, 2026 08:15
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 May 9, 2026 17:22
Convert VMWare to Hyper-V (vmdk to vhdx)
@roe3p
roe3p / mdlGen_Functions.vb
Last active March 23, 2023 04:54
Assortment of Excel VBA UDFs
'Module containing generic functions. Any requisite functions/variables are now annotated
'in the routine header, allowing this module to be swapped out more easily
'
' (c) R Shenoy 30/07/2013
'
' Last Updated 16/11/2018
Option Explicit
'Used for function that gets screen size