Skip to content

Instantly share code, notes, and snippets.

View Xevion's full-sized avatar
⚜️
Chaos Order

Xevion Xevion

⚜️
Chaos Order
View GitHub Profile

Keybase proof

I hereby claim:

  • I am xevion on github.
  • I am xevion (https://keybase.io/xevion) on keybase.
  • I have a public key ASAm89LfSNcdbKWjNBgQHChPenOqyJRNxS7b_vF7uSNpYAo

To claim this, I am signing this object:

@vor0nwe
vor0nwe / clip
Last active September 13, 2023 14:59
clip: WSL bash script to access the Windows Clipboard (both read and write)
#!/bin/bash
[[ ! -t 1 ]] && powershell.exe Get-Clipboard
[[ ! -t 0 ]] && clip.exe
if [[ -t 1 && -t 0 ]]; then
echo Nothing specified to copy or paste! >&2
exit 1
fi
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active August 12, 2025 13:40
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
let prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
let autocomplete = 'browser.urlbar.autoFill';
let history = 'browser.urlbar.suggest.history';
prefs.setBoolPref(history, !prefs.getBoolPref(history));
prefs.setBoolPref(autocomplete, !prefs.getBoolPref(autocomplete));
@jtomaszewski
jtomaszewski / useFormFieldWarning.ts
Last active August 18, 2024 22:59
Hook for `react-hook-form` that lets you maintain state of a form field's warning (that is: an error that doesn't prohibit the form from being submitted).
import { useCallback, useState, useEffect, useRef } from "react";
import {
LiteralToPrimitive,
UnpackNestedValue,
useFormContext
} from "react-hook-form";
import { useDebouncedCallback } from "use-debounce";
/**
* Returns state of a warning for the given form field.
# Usage: python3 tldr_fail_test.py ${HOSTNAME}
#
# You can optionally pass the destination IP with --addr
#
# Author: davidben [at] chromium [dot] org
import argparse
import socket
import time