Skip to content

Instantly share code, notes, and snippets.

@Graunephar
Graunephar / Getting started hello world examples for ESP32-C6 in PlatformIO both in ESP-IDF and Arduino.md
Last active January 15, 2025 11:19
Getting started hello world examples for ESP32-C6 in PlatformIO both in ESP-IDF and Arduino

Congratulations starting out on Your ESP32-C6!

When I started working with the ESP32-C6, I quickly realized how confusing it could be to find simple, working examples for getting started in PlatformIO. I needed basic, functional repositories to understand the differences between using Arduino and ESP-IDF, and how to work with features like the Ultra-Low Power (ULP) core. After spending countless hours piecing together information from various sources, I decided to create my own set of examples.

This gist will not go into details on why to choose one approach over the other. That can be found elsewhere. But for those who wants to use PlatformIO its a good starting point for working code.

This gist provides an overview of five working repositories I’ve built, each focused on a simple blink program. These examples are designed to be easy to understand and get you started without unnecessary complexity. Each repo is ready to clone and run in PlatformIO, covering the different ways to program the ESP32-C6

@tebogo-restrive
tebogo-restrive / opencv_video_to_pygame.py
Created October 8, 2017 16:01 — forked from radames/opencv_video_to_pygame.py
OpenCV VideoCapture running on PyGame
import pygame
from pygame.locals import *
import cv2
import numpy as np
import sys
camera = cv2.VideoCapture(0)
pygame.init()
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280,720])
@noirbizarre
noirbizarre / export_as_csvs.py
Created April 17, 2019 14:27
Export LibreOffice Calc sheets to individual CSV files
'''
A LibreOffice Calc Python macro exporting each sheet to an individual CSV file.
The CSV will be named <sheet name>.csv and will be sibling the source file.
To use this macro, store this file in your LibreOffice Python Scripts dir,
ie. `~/.config/libreoffice/4/user/Scripts/python/` on Linux
'''
import os

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone [email protected]:<hash>.git     # or with ssh
@paulirish
paulirish / what-forces-layout.md
Last active January 15, 2025 11:10
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@SanCoder-Q
SanCoder-Q / synology.startup
Created December 25, 2017 14:29
Synology NAS - How to make a program run at startup
Synology NAS - How to make a program run at startup
The other day I created a little node.js project to keep track of some finances. Synology has a node.js package but that just installs the tools - it has no 'container' or any other support to drop files and have it run automagically. Maybe one day.
In the meantime, you can start your project when you SSH into the NAS. My project has a 'www' script which bootstraps my project, so to start I simply type 'node bin/www' from the project directory. But, it only runs while I'm logged in, and if I log out for any reason, the process dies. That's hardly useful when I'm away from home, or on a different PC. So I decided to have a look at starting my project as a Linux service.
After doing a lot of research into how Synology does services, and a few failed attempts at init scripts, I found that Synology DSM (since version 5 perhaps) bundles Upstart, which is a neat little tool to deal with services on Linux. It's most prevalent on Debian and derivatives (notably Ub
@dgerrells
dgerrells / cargo_no_wasm
Created November 8, 2024 20:52
how fast is rust
[package]
name = "how_fast_is_rust"
version = "0.1.0"
edition = "2021"
[dependencies]
minifb = "0.27"
rand = "0.8"
wasm-bindgen = "0.2.95"
@yezz123
yezz123 / Exploitation.md
Created May 24, 2021 12:09
Pentesting-Exploitation
@drivevinhvien3
drivevinhvien3 / LARP on Ubuntu Server.md
Created January 15, 2025 08:37
LARP on Ubuntu Server

Okay, here's a more detailed explanation of LARP on Ubuntu Server in English:

LARP on Ubuntu Server: A Deep Dive

LARP, in the context of web development, stands for Linux, Apache, MySQL, and PHP/Python/Perl. It represents a popular and robust software stack used for hosting dynamic websites and web applications. This acronym breaks down as follows:

  • Linux (Operating System): This forms the foundational operating system layer of the stack. In this case, we're specifically focusing on Ubuntu Server, a variant of the Linux operating system tailored for server environments.
  • Apache (Web Server): The Apache HTTP Server is a widely-used web server responsible for handling HTTP requests from clients (like web browsers) and serving back the appropriate web content (HTML pages, images, etc.). It acts as the intermediary between the user and the server-side logic and data.
  • MySQL (Database Management System): MySQL is a relational database management system (RDBMS) used for storing,
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]