Skip to content

Instantly share code, notes, and snippets.

@loskiq
loskiq / config.yaml
Last active January 21, 2025 13:00
Xray on OpenWrt
inbounds:
- listen: 192.168.1.1
tag: all-in
port: 1083
protocol: dokodemo-door
settings:
network: tcp,udp
followRedirect: true
streamSettings:
sockopt:
//
// OCXML.swift
// Created by Marco Arment on 9/23/24.
//
// Released into the public domain. Do whatever you'd like with this.
// No guarantees that it'll do anything, or do it correctly. Good luck!
//
import Foundation
@aemonge
aemonge / ScreenShot.jpg
Last active January 21, 2025 12:57
Firefox Tabs on Bottom
ScreenShot.jpg
@santrancisco
santrancisco / merge.ps1
Created February 22, 2022 06:19
Merging evtx files
#Original code here : https://github.com/abhinav-eyesOnglass/evtx/tree/master
# MergeEventsInside.ps1
#
# - v2 : Fixed Installer bug (setting wrong registry keys in v1)
# : Add the possibility to run the script manually or just double click on it
#
# - v3 : Fixed a bug in FolderPath management to handle path with special characters such ad '[' & ']'
# Using -LiteralPath instead of -Path and Out-File instead of Add-Content
#
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active January 21, 2025 12:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active January 21, 2025 12:56
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@fabiolimace
fabiolimace / UUIDv6.sql
Last active January 21, 2025 12:56
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@vinzent
vinzent / zg-204zm.py
Last active January 21, 2025 12:56
Tuya PIR+MMWaver Presence sensor ZG-204M ZHA Quirk for HomeAssistant
"""
* TS0601 ZG-204ZM
* _TZE200_kb5noeto
* Works with HA 2024.11 - updated by @txip (Update 2)
* https://de.aliexpress.com/item/1005006174074799.html ("Color": Mmwave PIR)
* https://github.com/13717033460/zigbee-herdsman-converters/blob/6c9cf1b0de836ec2172d569568d3c7fe75268958/src/devices/tuya.ts#L5730-L5762
* https://www.zigbee2mqtt.io/devices/ZG-204ZM.html
* https://smarthomescene.com/reviews/zigbee-battery-powered-presence-sensor-zg-204zm-review/
* https://doc.szalarm.com/zg-205ZL/cntop_zigbee_sensor.js
* https://github.com/Koenkk/zigbee2mqtt/issues/21919
# This file is written in HOCON (Human-Optimized Config Object Notation) format.
# For more information about HOCON see
# https://github.com/lightbend/config/blob/master/HOCON.md
bindings {
b {
description: Buffer/Tabs Navigation...
bindings {
d {actionId: CloseContent, description: Close}
D {actionId: CloseAllEditors, description: Close All}
@zchee
zchee / actionlist.vim
Last active January 21, 2025 12:55
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>