Skip to content

Instantly share code, notes, and snippets.

// ChatGPT: Here's a C# console application that sets the resolution, scaling, and orientation of each monitor:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Runtime.InteropServices;
namespace MonitorSettings
{
@sensboston
sensboston / gist:ce4251c16cf83b82f64423bdd8a00e96
Last active October 6, 2021 04:24
Tiny program for quick words replacement in UTF8 text files
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace find_rep
{
class Program
{
static void Main(string[] args)
#include <FastLED.h>
FASTLED_USING_NAMESPACE
//#define _DEBUG
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
#define DATA_PIN 3
#define LED_TYPE WS2811
@sensboston
sensboston / FlangeLights2.ino
Created January 6, 2021 23:12
BLE controlled LED strip with cool colorful animations
#define DEBUG
#define USE_DEMO
#define FASTLED_INTERNAL
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <FastLED.h>
#define SERVICE_UUID "e7143cad-37d3-433c-a526-8c9c71f551a4"
@sensboston
sensboston / gist:e7be5f9ba09b0c00ebc68638977d5a66
Created December 10, 2020 23:13
gcc compilation comparison for Xtensa® CPU (ESP32)
long count = 0;
void loop() {
if (count++ >= 2000000)
{
count = 0;
delay(1000);
}
}