Skip to content

Instantly share code, notes, and snippets.

View SimpleSensing_ESP32.ino
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>
uint8_t note = 38;
int SNARE[6] = {150, 4000, 38, 3, 0, 0}; //{threshold, sensitivity, note(no use), flag, velocity, last peakValue}
boolean snareFlag = false;
BLECharacteristic *pCharacteristic;
sabas1080 / ESP32_HID.ino
Last active Apr 27, 2021
Example of HID Keyboard BLE with ESP32
View ESP32_HID.ino
Copyright (c) 2014-2020 Electronic Cats SAPI de CV. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
View k8s-dashboard-admin-user.yaml
apiVersion: v1
kind: ServiceAccount
name: admin-user
namespace: kube-system
kind: ClusterRoleBinding
name: admin-user
winggundamth / docker-compose.yml
Created Apr 28, 2018
Elasticsearch Cluster + Grafana Docker Compose File
View docker-compose.yml
version: '3'
container_name: es1
environment: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
MightyPork / usb_hid_keys.h
Last active May 10, 2021
USB HID Keyboard scan codes
View usb_hid_keys.h
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
* Created by MightyPork, 2016
* Public domain
* Adapted from:
morganrallen /
Last active Dec 24, 2016
ESP32 hacking notes

Basic hookup

As I plan to make a custom breakout board I wanted to solder as few connections as possible. I was able to boot the device, with UART (out at least) soldering the following.

1 3V3
2 EN
blundell /
Last active Aug 29, 2015
Unofficial Base WatchFace Listener
public class ExampleActivity extends Activity implements WatchFaceLifecycle.Listener {
protected void onCreate(Bundle savedInstanceState) {
WatchFaceLifecycle.attach(this, savedInstanceState, this);
PomepuyN / Watch face Ambient mode detection
Last active Nov 5, 2018
Allow to detect Ambient mode to switch Watch face display on Wear devices
View Watch face Ambient mode detection
Handler handler = new Handler(Looper.getMainLooper());
final DisplayManager displayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE);
displayManager.registerDisplayListener(new DisplayManager.DisplayListener() {
public void onDisplayAdded(int displayId) {
h4cc /
Created Nov 5, 2013
Using rsyslog on OpenVZ like Proxmox can lead to a problem, which symtoms are mostly >= 100% CPU usage of rsyslogd. Error message is "Cannot read proc file system: 1 - Operation not permitted.", because the file /proc/kmsg could not be read.
sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf
service rsyslog restart
# Source: