Skip to content

Instantly share code, notes, and snippets.

View sixhat's full-sized avatar
💭
Quiting Github.

36Ryz2H9K9aXP7CSE4Y9 sixhat

💭
Quiting Github.
  • 36Ryz2H9K9aXP7CSE4Y9
View GitHub Profile
int E1 = 3; // This will set the speed from 0 to 255 via analog Write
int E2 =11;
int M1 = 12; // This pin sets the direction /1 rotates CW / 0 rotates CCW
int M2 = 13;
void setup()
{
pinMode(M1, OUTPUT);
pinMode(M2, OUTPUT);
@sixhat
sixhat / makefile
Created October 29, 2026 14:37
makefile for MacOS (arm64) for atto https://github.com/hughbarney/atto
#
# makefile
#
# Based on Anthonys Editor January 93
#
# Public Domain 1991, 1993 by Anthony Howe. No warranty.
#
# Slight changes from the one at https://github.com/hughbarney/atto
# to compile in MacOS (Silicon)
function setup() {
createCanvas(500, 500);
rectMode(CENTER);
noLoop();
}
function draw() {
background(255);
CF::Background = [hue 163 b 0 saturation .75]
#CF::Symmetry = CF::Dihedral, 7
startshape aula5
shape aula5 {
# loopsbasicos [alpha -0.5 ]
loops (8) [alpha -0.5 ]
loops (3) [alpha -0.5 s 0.5 r 90]
@sixhat
sixhat / XIAO_ESP32C3_Button_LDR_LED_Timers_noDelay.ino
Created October 10, 2025 09:07
Example of using a Timer to run different tasks with different frequencies...
struct Timer {
bool active;
unsigned long previous;
unsigned long interval;
} luz, pisca;
/* Initializes timer with a given time interval */
void activateTimer(struct Timer* timer, unsigned long interval) {
timer->active = 1;
timer->previous = millis();
@sixhat
sixhat / semantic.html
Created September 25, 2025 08:47
Example of semantic HTML
<!DOCTYPE html>
<html lang="pt-PT">
<head>
<meta charset="UTF-8">
<title>Exemplo de HTML Semântico</title>
</head>
<body>
<header>
<h1>O Meu Blog</h1>
@sixhat
sixhat / gist:6d710ab9f6d086eba50a4dbe15120a9c
Created November 13, 2023 17:53
Create and Manage project folders with bash
#!/bin/bash
set -euo pipefail
__usage="usage: new_project name <type>
type can be one of md, r, or any other... and accordingly it should open
and setup different folder structures
name will be the folder name where the project exists.
"
#!/bin/bash
set -euo pipefail
__usage="usage: new_project name <type>
type can be one of md, r, or any other... and accordingly it should open
and setup different folder structures
name will be the folder name where the project exists.
"
// Particles - Move around
// When meeting other Particles
// Reproduce or Fight
ArrayList <Borg> borgs;
void setup() {
size(600, 600);
borgs = new ArrayList();
for (int i = 0; i<150; i++) {
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
* {box-sizing: border-box;}
body{ background: #ddd;
display: grid;