Skip to content

Instantly share code, notes, and snippets.

@ChronSyn
ChronSyn / vscode-tabs.jsonc
Last active August 19, 2022 18:10
Customise VSCode tabs using the CustomiseUI extension
{
"customizeUI.stylesheet": {
// Sets the styles for the active tab, such as background color and border
".monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab.sizing-fit.active": {
"background": "linear-gradient(to right, #ff6f00, #ffca28) !important;",
"border-bottom": "2px dotted #6200ea !important;",
"border-top": "2px dotted #6200ea !important;",
"color": "black !important;",
},
".monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab.sizing-fit.active.dirty": {
@ChronSyn
ChronSyn / README.md
Last active January 24, 2024 20:38
Spicetify - Remove Smart Shuffle, Remove DJ

I'm not the only person who is increasingly frustrated with Spotify and their determination to ignore the community while they COMPLETELY FUCK UP THE USER EXPERIENCE of their apps.

Some time ago, they added 'Smart Shuffle'. The community has clearly voiced their dislike of this feature, and yet still it remains in the app. Smart shuffle wouldn't be so bad if it wasn't combined with the regular shuffle button.

They also recently introduced the 'DJ' playlist which has no reliable way to be removed and is adding extra clutter we didn't ask for.

This is the third revision which removes the default shuffle button and replaces it with one which is visually identical but which only toggles shuffle functionality without smart shuffle.

  1. Install Spicetify
  2. If you want to remove smart shuffle: Place the contents of the remove-smart-shuffle.js file below in a file in your Spicetify extensions folder. For example, on Windows, place this file at %APPDATA%/spicetify/Extensions/remove-smart-shuffle.js. Run `spice
@ChronSyn
ChronSyn / Readme.MD
Last active February 20, 2024 15:40
ESPHome sound monitor with ESP32 and KY-037

ESPHome sound monitor using ESP32 and KY-037

I read a lot of reports online of these sensors being unreliable, or being difficult to tune. The latter part is partly true, but there's a lot of misunderstanding about how to interpret the data. Once you understand how you should interpret it, it becomes much clearer how you should calibrate it and how to configure your ESPHome device to use the data it provides.

My first thought was higher measured voltage = louder noise. After all, every sensor I'd worked with worked in this way, but most of them reported the 'human friendly' value - e.g. temperature, CO2, humidity, etc.

Sound is different. You probably know that sound is made up of waves, and you've probably seen a waveform corresponding to audio.

Louder sounds aren't represented by just a higher peak, but by a higher deviation. For example, your baseline is set at 0. When a sound happens, the waveform starts and you have values that are positive and negative - so shouting might be represented as many po

@ChronSyn
ChronSyn / get_spotify_details.ps1
Created March 13, 2025 12:32
Powershell / Windows - Get currently playing Spotify song title and artist to JSON output (using Spotify application window title)
while ($true) {
$processes = Get-Process spotify
$title = (Out-String -InputObject $processes.mainWindowTitle) -replace "`n","" -replace "`r",""
$song = $null
$artist = $null
$songTitle = $null
$jsonOutput = $null
$jsonOutputAsJson = $null
if (-Not $title.Contains('Spotify')) {
$song = $title
@ChronSyn
ChronSyn / main.ts
Created August 28, 2025 22:07 — forked from dannyhw/main.ts
make EXPO_PUBLIC accessible to storybook
import { StorybookConfig } from "@storybook/react-native-web-vite";
import { InlineConfig, mergeConfig } from "vite";
const main: StorybookConfig = {
stories: ["../components/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-docs", "@chromatic-com/storybook"],
framework: {
name: "@storybook/react-native-web-vite",