Skip to content

Instantly share code, notes, and snippets.

@xpac1985
xpac1985 / nftables.xml
Created April 5, 2018 18:08
nftables Syntax Highlighting for Notepad++
<NotepadPlus>
<UserLang name="nftables" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03&quot; 04&quot;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@reefwing
reefwing / IRBeacon.ino
Created August 9, 2018 02:45
An IR remote using the ESP32 and controlled via the IoT hub in Azure.
/*
* IRbeacon: Continually sends IR remote control information every 5 seconds
* An IR LED must be connected to the ESP32 pin IR_LED via 100 ohm resistor.
* Uses the ESP32-IRremote library and modified functions from the
* Microsoft GetStarted.ino sketch in the Examples folder.
*
* 0xa90 is the Sony power on/off code.
*
* Version 0.1 August, 2018
* Copyright 2018 David Such
@mcastelino
mcastelino / remap_and_post.md
Last active March 21, 2023 15:08
Interrupt Remapping and posted interrupt notes

https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf

• Legacy pin interrupts

— For devices that use legacy methods for interrupt routing (such as either through direct wiring to the I/OxAPIC input pins, or through INTx messages), the I/OxAPIC hardware generates the interrupt-request transaction. To identify the source of interrupt requests generated by I/OxAPICs, the interrupt-remapping hardware requires each I/OxAPIC in the platform (enumerated through the ACPI Multiple APIC Descriptor Tables (MADT)) to include a unique 16-bit source-id in its requests. BIOS reports the source-id for these I/OxAPICs via ACPI

@fnky
fnky / ANSI.md
Last active May 10, 2025 15:39
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@etiennetremel
etiennetremel / README.md
Last active March 25, 2025 15:36
Simple Wireguard setup as VPN server and multiple clients

Simple WireGuard configuration

1 server, 2 clients

Getting started

Install Wireguard on all machines.

Generate all keys

@mcfrojd
mcfrojd / Shield_Intents.MD
Last active April 12, 2025 04:44
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@bzamecnik
bzamecnik / power_saving_mode_for_nvidia_gtx_980_ti.md
Created March 9, 2019 21:56
Power saving mode for NVIDIA GTX 980 Ti.

My NVIDIA GTX 980 Ti being idle eats 53 W (out of 250 W max). Here's how to put to to a power saving mode at 30 W consumption and keep it prepared to run at higher performance automatically when there's a computation running.

TL;DR

sudo nvidia-smi -pm ENABLED -i 0
sudo nvidia-smi -ac 405,135 -i 0
@mtrimarchi
mtrimarchi / cloudflared
Last active January 4, 2023 11:41
Cloudflared with systemd
# /etc/default/cloudflared
CLOUDFLARED_OPTS=--port 5053 --upstream https://1.1.1.1/dns-query --upstream https://dns.google.com/resolve --upstream https://1.0.0.1/dns-query --upstream https://2606:4700:4700::1111/dns-query --upstream https://2606:4700:4700::1001/dns-query
@nick133
nick133 / gm_aliexpress_fix.js
Last active July 6, 2022 08:33
Fix Aliexpress Country/Currency settings
///
/// !!! Outdated - Not working with current aliexpress version !!!
///
// ==UserScript==
// @name Aliexpress fix locale
// @description Fix Aliexpress country and currency settings
// @icon https://www.aliexpress.com/favicon.ico
// @version 1
// @grant none
// @match https://*.aliexpress.com/*
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on