Skip to content

Instantly share code, notes, and snippets.

@anees042
anees042 / TP-Link Tapo C110 OpenIPC.md
Created August 24, 2025 23:13 — forked from cjdell/TP-Link Tapo C110 OpenIPC.md
TP-Link Tapo C110 OpenIPC
@anees042
anees042 / branch-commit-report
Created July 19, 2023 11:13 — forked from jrause/branch-commit-report
Generate report of all commits across all branches in a repository
for REMOTE_BRANCH in $(git branch -r | grep origin); do echo "$REMOTE_BRANCH"; git log $REMOTE_BRANCH --format='%ci|%an|%s' | grep -F -x -v -f ../"${PWD##*/}".csv >> ../"${PWD##*/}".csv; done
@anees042
anees042 / UpdateProtocolDafit.txt
Created July 10, 2023 00:30 — forked from atc1441/UpdateProtocolDafit.txt
DaFit App Update Protocol manual
Basic Manual for DaFit Fitness Tracker firmware update protocol, works for nearly any nRF52832 tracker from Company DaFit
The minimum size of update file is 0x10000(can be filled with garbage to get to size) and the maximum size is 0x2F000
the update will first get stored onto the external flash at position 0x3D1000 by the stock firmware(not by the bootloader)
the size of the update will get stored at 0x3D0000 on external flash with 4 bytes uint32_t
when bootloader gets activated it will copy the update from external flash to 0x23000 of the nRF52 internal flash.
Connect to device,
List with Compatible devices:
Look under About on the watch for the device Id.
looks something like this:
MOY-TEH5-1.7.7
the middle section is the interesting part, if that is in this list here
it has the compatible bootloader and the same pinout as pinetime for Display and External Flash
@anees042
anees042 / emoji.php
Created June 23, 2023 10:47 — forked from alanorth/emoji.php
Emoji class / function / variable names in PHP...
<?php
class πŸ’©πŸ’©πŸ’©πŸ’©
{
function πŸ’©πŸ’©πŸ’©($😎, $🐯)
{
return $😎 + $🐯;
}
}
$πŸ” = 3;
@anees042
anees042 / install_lamp_ubuntu.sh
Created January 18, 2023 13:00 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 22 - PHP development (php 7.4 / 8.2, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20/22 dev Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive
@anees042
anees042 / jsPromises.js
Created January 2, 2023 06:59 — forked from wassname/jsPromises.js
Wait for a jQuery selector in the browser using promises
/**
* This is too show the use of waiting for a jquery selector in the browser
* using promises. Much like how webdriverio works from outside the browser.
*
* Tested with jQuery v1.11.3 and chrome Version 48.0.* (64-bit)
**/
/**
* Wait for a jquery css selector
@anees042
anees042 / bv8.0+.py
Created August 25, 2021 17:53 — forked from stainslav/bv8.0+.py
This an tool to extract boot.img and kernel it is modified in such an way to Supports Android 8.0+ (Tested on Lineage OS 15 Redmi Note 4 Mido)... Usage Type:- In Linux : ./booting.py --help (It is necessary to install python!) "apt-get install python" In Linux Emulators : like termux, GNUROOT Debian, Terminal Emulator etc. On Android... Install …
#!/usr/bin/env python
#fileencoding: utf-8
#Author: Stain & Liu <knsaxena01@gmail.com & liudongmiao@gmail.com>
#Created : 17 Oct 2010 11:19:58 AM CST
#Modified : 15 Sep 2017 10:12:42 PM CST
import os
import sys
import mmap
import json
@anees042
anees042 / find-in-json.js
Created December 21, 2020 05:37 — forked from iwek/find-in-json.js
Searching through JSON
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //
@anees042
anees042 / stm32_sleep.ino
Created January 2, 2020 20:40 — forked from tomtor/stm32_sleep.ino
stm32 low power sleep code
#include <libmaple/pwr.h>
#include <libmaple/scb.h>
#include <RTClock.h>
// Define the Base address of the RTC registers (battery backed up CMOS Ram), so we can use them for config of touch screen or whatever.
// See http://stm32duino.com/viewtopic.php?f=15&t=132&hilit=rtc&start=40 for a more details about the RTC NVRam
// 10x 16 bit registers are available on the STM32F103CXXX more on the higher density device.
#define BKP_REG_BASE ((uint32_t *)(0x40006C00 + 0x04))