Skip to content

Instantly share code, notes, and snippets.

Avatar
✔️
Verified

winduptoy

✔️
Verified
View GitHub Profile
@winduptoy
winduptoy / SV3C SV-B01.md
Last active Oct 31, 2020
SV3C SV-B01 PoE IP Camera
View SV3C SV-B01.md

SV3C SV-B01 Toolkit

Hardware

SV3C SV-B01-1080P-POE Camera with 2018-09-07 firmware.

Known URLs

  • rtsp://[ip]:554/stream0 (main stream)
  • rtsp://[ip]:554/stream1 (sub stream)
@winduptoy
winduptoy / KD-1782.md
Last active Feb 1, 2020
KD-1782 NFC Basal Thermometer Decoding
View KD-1782.md

The CVS KD-1782 basal digial thermometer has NFC support, but only via an untrustworthy Chinese app. By decompiling said Android app, I was able to decode the messages that this thermometer sends over NFC and read temperatures.

The NFC messages are as follows:

0x65 0x6E 0x01 0x01 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 
0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0x19 0x0E 0x1B 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 
0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 
0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 
0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0xEF 0xBF 0xBD 0x13 0x78 0x43 0xEF 
@winduptoy
winduptoy / gl.h
Created Nov 27, 2018
GALOGEN GL/3.3/core Zig translation
View gl.h
/* This file was auto-generated by Galogen */
#ifndef _GALOGEN_HEADER_
#define _GALOGEN_HEADER_
#if defined(__gl_h_) || defined(__GL_H__) || defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gltypes_h_) || defined(__glcorearb_h_) || defined(__gl_glcorearb_h)
#error Galogen-generated header included after a GL header.
#endif
#define __gl_h_ 1
#define __gl32_h_ 1
#define __gl31_h_ 1
@winduptoy
winduptoy / main.js
Last active Aug 14, 2018
Taskwarrior: Import Google Reminders
View main.js
/*
- Export Google Reminders from Google Takeout
- Add this script to the HTML page
- Open the console and copy the results into a file
- Run task import results.json
- Recurring events are not processed, but logged for manual entry
*/
const root = document.body.children[0];
@winduptoy
winduptoy / roundCorners.js
Last active Nov 12, 2021
Paper.js – Rounded corners in plain JavaScript
View roundCorners.js
// Rounds the corners of a path in Paper.js
// Demo: http://sketch.paperjs.org/#S/lVRNj5swEP0rIy4LDSEQqRey0R52VamHqivtoYeQgxcmixXHRsawrVb8944NBfLRw3IA+c2b92bGNh+eZCf0Uu/liCYvvdDLVWHXLdNQG3ptQeI7PDNT+sEmkxbXrOBN/YsXpqRwEhOcydUKHjUyg8BcRl2yCgFb1H/goMnEUZgsQNU5F8IyTYlzsUweGpkbriQo+c3m+JQvTfCRSaDH1hNpPKkWXS0W69OpDP8HlRjVXPY5Ua4aaVbrOFgkwZeZyWbSmvUWvdDaH3zsk5MG6hRaju9RvwinaKW4NHUKydcZ2JskhMbxFby25DlcG62O+KiEIpe7V8Hy410f7YLzGjV1UrgNsEA4CFpSZwc/zmziVfQKBxpQU5lx24lvJ2rEDqtysxrWUS14jn5sFTNzFiLqbu/gg9K+FeEExSEI+oz5AuUbDZZi9yDos1gMrr1v3uhnO69Zyo7vIzfDzUST+Ntc82ABCWy3ZPgAMaTggOvkSmN7I3lJyfeU93BZrItYteUtNVvKEwrDSG2sfjlVeGF8gzrWM1BHxX/+22Ebh/go87+43RVWFPMjOh7E9MLYCYXnxJJunsCfjUknymrdi3fBZ13Gdm66fJfpxLgw6cYzlgtVY0GNGt2gi2k0jZbucNrDTT+jV/qjHPvL5qW7ffcX
// -- Translated from PaperScript to plain JavaScript. Originally by Alex Blackwood.
// -- http://stackoverflow.com/questions/25936566/paper-js-achieving-smoother-edges-with-closed-paths
function roundCorners(path,radius) {
var segments = path.segments.slice(0);
path.remov
@winduptoy
winduptoy / Vector2D.js
Last active Nov 9, 2021
JavaScript 2D Vector Class
View Vector2D.js
/*
Simple 2D JavaScript Vector Class
Hacked from evanw's lightgl.js
https://github.com/evanw/lightgl.js/blob/master/src/vector.js
*/
function Vector(x, y) {