Skip to content

Instantly share code, notes, and snippets.

@jirkadev
jirkadev / bose-fw-downgrade.user.js
Created October 17, 2026 20:09
Tampermonkey script: auto-enters the advanced-mode key sequence (a d v Up Down) on btu.bose.com
// ==UserScript==
// @name Bose FW Downgrade
// @namespace http://tampermonkey.net/
// @version 2026-04-03
// @description try to take over the world!
// @author You
// @match https://btu.bose.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bose.com
// @grant none
// ==/UserScript==
@jirkadev
jirkadev / bose-reflash
Created October 17, 2026 20:00
bose-reflash: reflash a USB-connected Bose device (e.g. Revolve+) with its current firmware via the local Bose Updater, macOS. Unofficial, use at your own risk.
#!/usr/bin/env python3
"""Reflash the connected Bose device with its current firmware.
Does what btu.bose.com does after the advanced-mode key sequence
(a d v Up Down): calls the local Bose Updater's updateToSpecificVersion.
Usage: bose-reflash [--dry-run] [--version X.Y.Z.B]
"""
import argparse
import json
import random
# configure git credentials manager to work with GPG
# usefull for sessions without GUI
# https://github.com/GitCredentialManager/git-credential-manager
# https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/credstores.md#gpgpass-compatible-files
# install pass
sudo apt install pass
# generate gpg key pair
@jirkadev
jirkadev / browser console
Last active December 30, 2021 11:13
deepsource autofix
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/gh/jirikrepl/nedatluj-meteor/issues?category=recommended&analyzer=all&page=1".
It https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
confirmTransition https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
transitionTo https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
replace https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
replace https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
replace https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
t https://assets.deepsource.io/38d5c8a/bifrost/facf1ab.js:1
d https://assets.deepsource.io/38d5c8a/bifrost/a4a288e.js:2
# SEND VIRTUAL VALUE
# # You can currently send Strings, Int32, Float32 and Tuples to pybytes using this method.
# # Soon you will be able to send Coordinates, Longs, Unsigned numerical types, and more.
# pybytes.send_virtual_pin_value(False, 26, 'The device restarted')
#
# # SEND SENSOR DATA THROUGH VIRTUAL PINS
# # If you use a Pysense, some libraries are necessary to access its sensors
# # you can find them here: https://github.com/pycom/pycom-libraries
#
# # Include the libraries in the lib folder then import the ones you want to use here:
Template consultant_sidebarStatus used somewhere with this context ...
{{> consultant_sidebarStatus consultant=consultant}}
How template consultant_sidebarStatus looks like
<template name="consultant_sidebarStatus">
{{goldStatus}}
{{#with x=1}}
{{goldStatus}}
{{/with}}
// Gulp with BrowserSync http://www.browsersync.io/docs/gulp/
// Gulp with Symfony framework: http://knpuniversity.com/screencast/gulp
// run "gulp" in development environment
// run "gulp --production" in production environment
var gulp = require('gulp'),
minifyCss = require('gulp-minify-css'),
//less = require('gulp-less'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
// Gulp with Symfony framework: http://knpuniversity.com/screencast/gulp
// run "gulp" in development environment
// run "gulp --production" in production environment
var gulp = require('gulp'),
minifyCss = require('gulp-minify-css'),
less = require('gulp-less'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
ngAnnotate = require('gulp-ng-annotate'),