Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdint.h>
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo
{
while(len--)
{
crc ^= *buffer++ << 8;
int bits = 0;
do
@shugen002
shugen002 / 原始.js
Last active April 28, 2020 01:16
B站头像直传脚本
var input= document.createElement("input");
input.type="file";
input.onchange=function(){
if(input.files.length>0){
var data= new FormData();
data.append("dopost","save");
data.append("Displayrank","10000");
data.append("face",input.files[0]);
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
@necr0n
necr0n / powershell_new_service
Last active April 9, 2023 12:28
OpenSM Windows service
#
# Check if we have OpenSM service
#
Get-Service op*
#
# If it's present and running, stop and remove this service.
# There's Remove-Service available with PowerShell 6.0, which you likely don't have.
# Use sc.exe delete OpenSM or command below
#
Stop-Service 'OpenSM'; Get-CimInstance -ClassName Win32_Service -Filter "Name='OpenSM'" | Remove-CimInstance
@alfredkrohmer
alfredkrohmer / xbox-one-wireless-protocol.md
Created November 23, 2016 21:52
XBox One Wireless Controller Protocol

Physical layer

The dongle itself is sending out data using 802.11a (5 GHz WiFi) with OFDM and 6 Mbit/s data rate:

Radiotap Header v0, Length 38
    Header revision: 0
    Header pad: 0
    Header length: 38
    Present flags