This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Props to user brechmos for sharing the code here: https://www.raspberrypi.org/forums/viewtopic.php?t=55100 | |
# Tested with the following barcode scanner | |
# macbook# ioreg -p IOUSB | |
# <snip> | |
# | +-o WIT 122-UFS V2.03@14200000 <class AppleUSBDevice, id 0x10000c3c4, registered, matched, active, busy 0 (6 ms), retain 14> | |
# WIT 122-UFS V2.03: | |
# Product ID: 0x1010 | |
# Vendor ID: 0x05fe (CHIC TECHNOLOGY CORP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include "soc/rtc_cntl_reg.h" | |
#include "esp32/ulp.h" | |
#include "driver/rtc_cntl.h" | |
#include "esp_log.h" | |
#include "ulp_main.h" | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/semphr.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This sample illustrates how to go back to deep sleep from the | |
* deep sleep wake stub. | |
* | |
* Consider the use case of counting pulses from an external sensor, | |
* where the pulses arrive at a relatively slow rate. | |
* | |
* ESP32 is configured to go into deep sleep mode, and wake up from | |
* a GPIO pin connected to the external pulse source. | |
* Once the pulse arrives, ESP32 wakes up from deep sleep and runs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tnx to mamalala | |
# Changelog | |
# Changed the variables to include the header file directory | |
# Added global var for the XTENSA tool root | |
# | |
# This make file still needs some work. | |
# | |
# Updated for SDK 0.9.2 | |
# | |
# Output directors to store intermediate compiled files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Traverses an arbitrary struct and translates all stings it encounters | |
// | |
// I haven't seen an example for reflection traversing an arbitrary struct, so | |
// I want to share this with you. If you encounter any bugs or want to see | |
// another example please comment. | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Heye Vöcking | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def hexdump(src, length=16, sep='.'): | |
""" | |
>>> print(hexdump('\x01\x02\x03\x04AAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBB')) | |
00000000: 01 02 03 04 41 41 41 41 41 41 41 41 41 41 41 41 |....AAAAAAAAAAAA| | |
00000010: 41 41 41 41 41 41 41 41 41 41 41 41 41 41 42 42 |AAAAAAAAAAAAAABB| | |
00000020: 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 |BBBBBBBBBBBBBBBB| | |
00000030: 42 42 42 42 42 42 42 42 |BBBBBBBB| | |
>>> |