Skip to content

Instantly share code, notes, and snippets.

View rorosaurus's full-sized avatar

Rory Hayes rorosaurus

View GitHub Profile
@benpeoples
benpeoples / readme.txt
Created June 1, 2020 16:03
ESP32 LEDC Maximum frequency by resolution
Per this forum post: https://esp32.com/viewtopic.php?t=6701
The way to calculate max PWM frequency is integer (log 2 (LEDC_APB_CLK / frequency))
With a LEDC_APB_CLK == 80MHz, these are the following maximum values, in Hz:
LEDC_TIMER_1_BIT, 40000000
LEDC_TIMER_2_BIT, 20000000
LEDC_TIMER_3_BIT, 10000000
LEDC_TIMER_4_BIT, 5000000
LEDC_TIMER_5_BIT, 2500000
@kriegsman
kriegsman / Pacifica.ino
Last active January 27, 2024 04:25
Pacifica: gentle, blue-green ocean waves. For Dan.
//
// "Pacifica"
// Gentle, blue-green ocean waves.
// December 2019, Mark Kriegsman and Mary Corey March.
// For Dan.
//
#define FASTLED_ALLOW_INTERRUPTS 0
#include <FastLED.h>
FASTLED_USING_NAMESPACE
@andre-geldenhuis
andre-geldenhuis / main.cpp
Last active August 12, 2018 02:32
Fastled break one long strip into virtual substrips with CRGBSet
#include "FastLED.h"
FASTLED_USING_NAMESPACE
#define NUM_LEDS 60
#define NUM_LEDS_1 20
#define NUM_LEDS_2 30
#define NUM_LEDS_3 10
CRGBArray<NUM_LEDS> leds;
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@graceavery
graceavery / harryPotterAliases
Last active May 10, 2023 02:51
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 28, 2024 10:38
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@NinjaLikesCheez
NinjaLikesCheez / PuffGrab.py
Created March 3, 2014 14:41
PuffGrab - a nice way to grab 'secure' puffs from PuffChat.
import urllib2
import json
import urllib
import os
import errno
key = "dl81Vh2uorfNdj2Rt2M4EylW91uUsQRZwhQ99g7K0MRXeMYePS"
baseURL = "http://www.puffchat.me/chatAPI/requestAPI.php"
uploadURL = "http://www.puffchat.me/upload/"
@coffeemug
coffeemug / gist:6168031
Last active February 3, 2022 23:16
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.