Skip to content

Instantly share code, notes, and snippets.

@mtijanic
mtijanic / rmmsg.c
Created June 10, 2024 11:39
Control OpenRM's log verbosity at runtime
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// ctrl0000system.h
#define NV0000_CTRL_CMD_SYSTEM_DEBUG_RMMSG_CTRL (0x121U)
#define NV0000_CTRL_SYSTEM_DEBUG_RMMSG_SIZE 512U
@DavidAce
DavidAce / nvidia-tdp.service
Last active April 20, 2025 15:02
Nvidia power limit at boot
[Unit]
Description=Set NVIDIA power limit above default
[Service]
Type=oneshot
ExecStartPre=/usr/bin/nvidia-smi -pm 1
ExecStart=/usr/bin/nvidia-smi -pl 275
@eNV25
eNV25 / hp-bios-update.md
Last active April 16, 2025 18:44
Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

To update the BIOS/UEFI firmware requires HP-specific files in the EFI System Partition, also referred to as ESP.

On a Linux system, the ESP is typically mounted on /boot/efi or /efi. Whithin you should also find a EFI directory, e.g. /boot/efi/EFI or /efi/EFI. This article assumes that the ESP is mounted on /efi and that the /efi/EFI directory exists. You can replace that with the mount point your system uses.

The HP-specific files are located in /efi/EFI/HP or /efi/EFI/Hewlet-Packard. These files typically come preinstalled in HP Windows PCs. If you have these files you could skip Install HP-specific files.

@Far-Se
Far-Se / yt-remove-liked-videos-v2.js
Last active October 16, 2022 03:19
Youtube delete all liked videos. Hover your mouse on the 3 dots then hit F4. If video is deleted, go with the mouse to the next one. Install AutoHotKey first.
//Open DevTools and paste this in Console.
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function deleteLikedVideos() {
'use strict';
var items = document.querySelectorAll('ytd-menu-renderer > yt-icon-button.dropdown-trigger > button[aria-label]');
var out;
@Matheus-Garbelini
Matheus-Garbelini / esp8266_wpa2_enterprise_example.ino
Last active July 1, 2024 17:33
ESP8266 Wi-Fi WPA2 Enterprise example
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
#include "wpa2_enterprise.h"
#include "c_types.h"
}
// SSID to connect to
char ssid[] = "TEST_KRA";
@marcan
marcan / rpi_cam_auth.py
Created January 25, 2019 07:48
Raspberry Pi Camera V2 DRM authentication example
import hmac, hashlib
# Data from I²C trace at https://hackaday.io/project/19480-raspberry-pi-camera-v21-reversed/log/52547-i2c-logic-analyzer-trace
# Secret key from VideoCore blob
# serial[8], serial[7:4], serial[3:0]
serial = bytes.fromhex("EE8C196D8301230B59")
# rPi -> camera random number
numIn = bytes.fromhex("5805F3C898C3133154498E082F2E703516F2DBD1")
@cnlohr
cnlohr / esp32_aes_example.c
Created November 7, 2018 19:50
Example of using hardware AES 256 Crypto in CBC mode on the ESP32 using ESP-IDF
#include <string.h>
#include <stdio.h>
#include <hwcrypto/aes.h>
/*
For Encryption time: 1802.40us (9.09 MB/s) at 16kB blocks.
*/
static inline int32_t _getCycleCount(void) {
int32_t ccount;
@gitfvb
gitfvb / readme.md
Last active April 14, 2025 07:05
Notes on Quelima R3 WiFi Camera

First

  • Install the app "Sports DV" and change WiFi SSID and password

URLs

  • Wifi and Cam settings are seperated and have different port numbers.
  • Wifi-Settings (just login withoug username and password): http://192.168.25.1
  • Cam LiveStream: http://192.168.25.1:8080/?action=stream
  • Not sure how the configuration is made really... Would need a Man-In-The-Middle-Attack or send the initial ICMP package

Change AP (Cam is the access point) to Station (Cam is a normal WiFi Client)

// https://yoursunny.com/t/2018/PacketDump/
#include <cassert>
#include <ESP8266WiFi.h>
#include <lwip/netif.h>
// #include <user_interface.h>
#include "PacketParser.hpp"
const char* WIFI_SSID = "my-ssid";
const char* WIFI_PASS = "my-pass";
@DKrepsky
DKrepsky / Kicad project relative path
Created July 13, 2017 14:12
Add project relative path into kicad
To add paths relative to the project folder use the environment variable ${KIPRJMOD}.
Example: ${KIPRJMOD}/3d/resistor_model.wrl