Skip to content

Instantly share code, notes, and snippets.

@DannyGH
DannyGH / calendar-widget.html
Created May 11, 2025 09:04
Google Calendar Widget for Notion
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minimalist Google Calendar Widget</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
:root {
--bg-color: #1e1f21;
#!/usr/bin/env python
import paho.mqtt.client as mqtt
import RPi.GPIO as GPIO
def on_connect(client, userdata, rc):
#print ("Connected with rc: " + str(rc))
client.subscribe("kwf/demo/led")
def on_message(client, userdata, msg):
@DannyGH
DannyGH / ADXL325 accelero
Created October 26, 2015 09:08 — forked from xrl/ADXL325 accelero
ADXL345 accelerometer programming code. Immediately raises interrupt when inactivity below THRESH_INACT is detected.
//Add the SPI library so we can communicate with the ADXL345 sensor
#include <SPI.h>
//Assign the Chip Select signal to pin 10.
int CS=10;
//ADXL345 Register Addresses
#define DEVID 0x00 //Device ID Register
#define THRESH_TAP 0x1D //Tap Threshold
#define OFSX 0x1E //X-axis offset