Skip to content

Instantly share code, notes, and snippets.

View caffo's full-sized avatar

Rodrigo Franco caffo

View GitHub Profile
@caffo
caffo / calming.c
Created November 16, 2023 19:47
a calming blinking light — https://caffo.link/led
const int ledPin = 13;
unsigned long startTime;
float currentDelay;
float initialBPM;
float finalBPM;
unsigned long interval; // Duration of BPM change
unsigned long holdInterval; // Duration to hold at final BPM
unsigned long fadeInterval; // Duration of fade to off
unsigned long totalTime; // Total time until LED turns off
@oschmid
oschmid / roam-random-page.js
Last active June 6, 2021 21:20
Adds a 'Random' button to the left sidebar. Works anywhere in Roam. Shift-Click to open in right sidebar (you may see 'All Pages' appear briefly). Alt+R or Alt+Shift+R keyboard commands. Moved to https://github.com/oschmid/roam-plugins/blob/master/random-page-plugin.js
// Moved to https://github.com/oschmid/roam-plugins/blob/master/random-page-plugin.js
Copy this to roam/js page, including the "{{[[roam/js]]}}" node:
- {{[[roam/js]]}}
- ```javascript
/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* How to install it:
* - go to `roam/js` page`
@ericwindmill
ericwindmill / form_page.dart
Created April 14, 2018 19:25
Flutter Simple inherited Widget Example
import 'package:flutter/material.dart';
import 'package:simple_inherit/state_container.dart';
class UpdateUserScreen extends StatelessWidget {
static final GlobalKey<FormState> formKey = new GlobalKey<FormState>();
static final GlobalKey<FormFieldState<String>> firstNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> lastNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> emailKey =
@jamtur01
jamtur01 / ladder.md
Last active April 14, 2024 22:28
Kickstarter Engineering Ladder
@tylerneylon
tylerneylon / json.lua
Last active April 19, 2024 21:02
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@Eiyeron
Eiyeron / LLT.c
Last active March 6, 2024 19:55
Long Line Theory, finally in C. Enjoy one the best bytebeat directly from your terminal without Javascript!
#include <stdio.h>
#include <math.h>
#define min(a, b) (a) < (b) ? (a) : (b)
#define max(a, b) (a) > (b) ? (a) : (b)
int main(int t, char** argc) {
double sb, y, h, a, d, g;
@matthutchinson
matthutchinson / fnotify.pl
Created August 21, 2010 10:47
Irssi fnotify
# todo: grap topic changes
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
authors => 'Thorsten Leemhuis',
contact => 'fedora@leemhuis.info',