Skip to content

Instantly share code, notes, and snippets.

// jest tests
describe("getTickValues method", () => {
const dispformat = "DD-MMM-YYYY hh:mm";
beforeAll(() => {
moment.tz.setDefault("Europe/London");
});
it("generates tick values with DST", () => {
@dp21g
dp21g / pinch.js
Created May 1, 2019 09:34
Track pinch gestures in browser using only touch events (attempt to not use HammerJS)
// 1. Track the touches
let touches = {
start: [],
end: [],
};
// 2. When the touch events end, calculate if its pinching inwards or outwards
const handleTouchEnd = () => {
if (touches.start.length === 0 || touches.end.length === 0) {
return;
@dp21g
dp21g / Macro Manager.ahk
Created August 12, 2024 22:50
Macro Manager with UI(Auto Hotkey v2) similar to Keyboard Maestro on Mac (Ctrl+Alt+T to launch macro search)
#Requires AutoHotkey v2.0
^!t::ShowMacroSearch()
MacroFilePath := A_ScriptDir . "\macros.txt"
global MacroTypeMap := Map()
MacroTypeMap["1"] := "Send"
MacroTypeMap["2"] := "Run"

How to Fix the Bootloader on the EFI System Partition in Windows causing Blue screen of death(BSOD) and infinite boot loop.

Step 1: Access the Windows Repair Menu

  1. Use a USB bootable Windows drive to access the repair menu.
  2. Open the Command Prompt from the repair menu.

Step 2: Assign a Drive Letter to the EFI Partition

  1. In the Command Prompt, type diskpart and press Enter.
  2. List the volumes by typing list volume and press Enter.
  3. Identify the EFI System Partition, then type select volume X (replace X with the volume number of the EFI partition) and press Enter.