Skip to content

Instantly share code, notes, and snippets.

@pb-uk
pb-uk / prose.css
Created June 25, 2022 22:03
CSS for textual content following a hard reset
.prose :first-child {
margin-top: 0 !important;
}
.prose {
line-height: 1;
text-rendering: optimizeLegibility;
}
.prose,
@pb-uk
pb-uk / example.jts.json
Last active October 11, 2021 12:12
JSON time series example
{
"docType": "jts",
"version": "1.0",
"header": {
"startTime": "2014-08-16T02:00:00.000Z",
"endTime": "2014-08-16T02:20:43.000Z",
"recordCount": 5,
"columns": {
"0": {
"id": "541a5a129bc9b4035f906d70",
{
"docType": "jts",
"version": "1.0",
"header": {
"startTime": "2014-08-16T02:00:00.000Z",
"endTime": "2014-08-16T02:20:43.000Z",
"recordCount": 5,
"columns": {
"0": {
"id": "541a5a129bc9b4035f906d70",
#include <iostream>
using namespace std;
#define M 3;
int main() {
int step = 0;
uint64_t n = 2;
uint64_t term = 2;
@pb-uk
pb-uk / use-postfix-carefully.md
Created August 12, 2020 16:01
Use postfix operators wisely
// It starts innocently enough:
int j = 0;
a = b[j++];
// a now contains b[0] and j is 1.

// Now I want to add a value from another array:
a = b[j] + c[j++];
// But how this works is not defined in the C++ standard, compilers don't even
This is part of a conversation resulting from a
[Post on PhysicsForums](https://www.physicsforums.com/threads/trying-to-decide-which-programming-language-i-want-to-learn.991177/post-6378518).
## Source code (simple Fibonnaci sequence)"
```cpp
#include <iostream>
using namespace std;
int main() {
int a[100] = {0, 1};
@pb-uk
pb-uk / SimpleWiFiServer.ino
Created October 17, 2019 21:40
SimpleWiFiServer working on an Adafruit Feather ESP32
/*
WiFi Web Server LED Blink
A simple web server that lets you blink an LED via the web.
This sketch will print the IP address of your WiFi Shield (once connected)
to the Serial monitor. From there, you can open that address in a web browser
to turn on and off the LED on the internal LED.
If the IP address of your shield is yourAddress:
http://yourAddress/H turns the LED on
http://yourAddress/L turns it off
This example is written for a network using WPA encryption. For