Skip to content

Instantly share code, notes, and snippets.

@ciniml
ciniml / gowin.py
Last active October 21, 2024 16:21
GOWIN SSPI configuration script for M5Stack
import os
import machine
import time
class GowinConfig(object):
def __init__(self, pin_cs:machine.Pin, pin_mode0:machine.Pin, pin_reconfig_n:machine.Pin, pin_ready:machine.Pin, spi:machine.SPI):
self.__pin_cs = pin_cs
self.__pin_mode0 = pin_mode0
self.__pin_reconfig_n = pin_reconfig_n
self.__pin_ready = pin_ready
@Konamiman
Konamiman / SDCC_Interfacing_with_assembler_code.md
Last active September 20, 2025 14:27
[SDCC] Interfacing with Z80 assembler code

SDCC - Interfacing with Z80 assembler code

The basics

When writing code to be compiled with SDCC targetting Z80, assembler code fragments can be inserted in the C functions by enclosing them between the __asm and __endasm; tags:

void DoNotDisturb()
{
  __asm

di

@przemekklosowski
przemekklosowski / edid.py
Last active March 19, 2024 20:30 — forked from shirriff/edid.py
Parse VGA configuration data (EDID) accessed from I2C device 0x50
# Program to parse VGA data (EDID) accessed from I2C device 0x50
#
# This is a quick demo not a supported program, so don't expect
# correctness from it.
#
# Edid format from:
# https://en.wikipedia.org/wiki/Extended_Display_Identification_Data#EDID_1.4_data_format
#
# Ken Shirriff http://righto.com
@sabas1080
sabas1080 / ESP32_HID.ino
Last active November 25, 2024 08:30
Example of HID Keyboard BLE with ESP32
/*
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
@iandanforth
iandanforth / localjstojupyter.md
Last active February 15, 2024 17:23
How to serve local JavaScript to a hosted Jupyter notebook

Local JavaScript -> Hosted Jupyter notebook

Description

If you have:

  • A hosted Jupyter notebook (e.g. on Google Colaboratory)
  • A local JavaScript development environment you prefer to use

You can:

@scpeters
scpeters / valkyrie_sim_gazebo_sync.urdf
Created March 13, 2017 23:56
valkyrie urdf with neck fix via larger Kp and damping
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from /home/docker/ws/src/val_description/model/robots/valkyrie_sim_gazebo_sync.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="valkyrie" xmlns:xacro="http://www.ros.org/wiki/xacro">
<gazebo>
<plugin filename="libval_gazebo.so" name="SharedMemorySimInterfacePlugin">
<robotNamespace>/val</robotNamespace>
<updateRateHz>500.0</updateRateHz>
@MightyPork
MightyPork / usb_hid_keys.h
Last active October 29, 2025 06:21
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@mhawksey
mhawksey / gist:3007293
Created June 27, 2012 22:26
Turn Google Site pages into RSS feed
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software