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
View calming.c
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
View roam-random-page.js
// Moved to https://github.com/oschmid/roam-plugins/blob/master/random-page-plugin.js
View roam-templates.txt
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
View form_page.dart
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 February 12, 2024 00:10
Kickstarter Engineering Ladder
@tylerneylon
tylerneylon / json.lua
Last active February 5, 2024 23:05
Pure Lua json library.
View json.lua
--[[ 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.
@matthutchinson
matthutchinson / fnotify.pl
Created August 21, 2010 10:47
Irssi fnotify
View fnotify.pl
# 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',