Skip to content

Instantly share code, notes, and snippets.

@theolivenbaum
theolivenbaum / Send infrared commands from the Arduino to the iRobot Roomba Send infrared commands from the Arduino to the iRobot Roomba. Use a transistor to drive the IR LED from pin D3 for maximal range.
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@theolivenbaum
theolivenbaum / yahoo-answers-crawler.cs
Created April 10, 2021 14:09
Yahoo! Answers Sitemap crawler
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using System.Xml.Serialization;
using System.Linq;
using System.IO.Compression;
using System.Threading;
using System.Diagnostics;
@theolivenbaum
theolivenbaum / PaddleModels.cs
Last active September 11, 2021 13:53
How to use PaddleOCR in C# (using https://www.nuget.org/packages/PaddleOCR)
public static class Paddle
{
public static string DetectionModelDirectory { get; set; }
public static string RecognitionModelDirectory { get; set; }
public static string ClassificationModelDirectory { get; set; }
public static string CharactersFile { get; set; }
private static bool _initialized;
private readonly static object _initializeLock = new();
@theolivenbaum
theolivenbaum / download-latest-from-github-releases-worker.js
Last active October 30, 2021 11:55
CloudFlare worker to retrieve the latest release from a repository and return to your worker endpoint
addEventListener("fetch", event => {
event.respondWith(fetchAndStream(event.request))
});
async function fetchAndStream() {
const init = {
headers: {
"User-Agent": "CloudFlare Worker/v42",
},
@theolivenbaum
theolivenbaum / index.html
Created November 16, 2021 14:52
Electron Vibrancy issue
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>Hello World!</title>
<style>
body{
background: green;
}