Skip to content

Instantly share code, notes, and snippets.

@mostlygeek
mostlygeek / cooler-bot.ino
Created January 2, 2022 23:51
Code for a little robot that open/closes a door in my AV console when it gets too hot inside.
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
// *** -= WIFI & Web =- **************************************
ESP8266WebServer server(80); // listen on port 80
// ***********************************************************
@mostlygeek
mostlygeek / .profile
Created August 14, 2021 17:02 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@mostlygeek
mostlygeek / customize-mx-master-ubuntu.md
Last active May 16, 2021 23:25 — forked from bogdanRada/customize-mx-master-ubuntu.md
Custom keymap for Logitech MX Master 2S mouse on Ubuntu

Notes for Ubuntu 21.04, getting the MX Master mouse to work.

  1. Ubuntu 21.04 uses Wayland by default. These instructions only work for x.org
  2. Getting Wayland to rebind mouse keys was confusing. Much easier to just use x.org and these instructions I found.

First, install Solaar to see the battery level on the taskbar

sudo apt-get install solaar
@mostlygeek
mostlygeek / jun-jul-aug.txt
Created August 18, 2020 00:47
Normandy experiments with JEXL in Jun, Jul, Aug 2020
Turned into new FilterObject: preset_choices=['pocket-1']
https://github.com/mozilla/normandy/pull/2250
==========================================================
> 2020-07-14 1011 multi-preference-experiment [(!("browser.newtabpage.enabled"|preferenceIsUserSet)||!("browser.startup.homepage"|preferenceIsUserSet))]
> 2020-06-02 975 multi-preference-experiment [(!("browser.newtabpage.enabled"|preferenceIsUserSet)||!("browser.startup.homepage"|preferenceIsUserSet))&&!("browser.newtabpage.activity-stream.showSearch"|preferenceIsUserSet)&&!("browser.newtabpage.activity-stream.feeds.topsites"|preferenceIsUserSet)&&!("browser.newtabpage.activity-stream.feeds.section.topstories"|preferenceIsUserSet)&&!("browser.newtabpage.activity-stream.feeds.section.highlights"|preferenceIsUserSet)&&!("browser.newtabpage.activity-stream.showSponsored"|preferenceIsUserSet)]
> 2020-06-02 976 multi-preference-experiment [(!("browser.newtabpage.enabled"|preferenceIsUserSet)||!("browser.startup.homepage"|preferenceIs
@mostlygeek
mostlygeek / 2020-07-01.txt
Last active July 1, 2020 19:27
tidy up recipes
source: https://github.com/mostlygeek/normandy-tools/tree/master/bin/show-changes
updated created days_ttl revs live? id type slug
------- ------- -------- ---- ----- -- ---- ----
2020-06-30 2020-06-30 0 1 true 1008 branched-addon-study bug-1649504-addon-google-accounts-login-check-v2-release-75-78
2020-06-30 2020-06-30 0 1 true 1006 preference-rollout bug-1622091-rollout-beta-rollout-of-samesite-lax-change-beta-79-81
2020-06-30 2020-06-23 7 3 true 997 multi-preference-experiment bug-1646068-pref-activity-stream-pocket-new-tab-dynamic-video-card-sm-beta-78-79
2020-06-30 2020-06-23 7 2 true 999 multi-preference-experiment bug-1646076-pref-activity-stream-pocket-new-tab-popular-topics-smoke--beta-78-79
2020-06-30 2020-06-23 7 2 true 998 multi-preference-experiment bug-1646718-pref-understand-retention-impact-of-pdf-unknown-conten
!! Note!!
The total count uses the last time the recipe was changed. Interpret the
number as the number of recipes *LAST CHANGED* in that month.
If a recipe CREATED in 2019-02 is changed in 2019-06 it will
be counted in 2019-06.
@mostlygeek
mostlygeek / gist:b8d80fe367881e42fcc419ea642c112a
Last active March 5, 2019 18:31
active normandy recipes (formatted)
$ curl -s 'https://normandy.cdn.mozilla.net/api/v1/recipe/?enabled=true' | jq -c '.[] | "(\(.id))|\(.action)|\(.last_updated)|\(.name)"' | sed 's/"//g' | column -ts '|'
(713) show-heartbeat 2019-03-05T18:13:42.890914Z Heartbeat: Pinned Tabs Usage
(711) show-heartbeat 2019-03-04T21:24:46.984158Z Heartbeat Scroll [vpn]
(710) show-heartbeat 2019-03-04T21:24:28.155971Z Heartbeat Scroll [v3d]
(709) show-heartbeat 2019-03-04T21:24:14.293945Z Heartbeat Scroll [v3c]
(708) show-heartbeat 2019-03-04T21:23:53.036426Z Heartbeat Scroll [v3b]
(707) show-heartbeat 2019-03-04T21:23:35.399718Z Heartbeat Scroll [v3a]
(706) show-heartbeat 2019-03-04T21:23:15.145977Z Heartbeat Scroll [v2d]
(705) show-heartbeat 2019-03-04T21:22:58.267500Z Heartbeat Scroll [v2c]
@mostlygeek
mostlygeek / openvpn edgerouter lite
Created November 11, 2018 00:16
my edgerouter TCP 443 open vpn config
openvpn vtun1 {
firewall {
in {
name OVPN_IN
}
local {
name OVPN_LOCAL
}
out {
name OVPN_OUT
@mostlygeek
mostlygeek / table.md
Last active November 6, 2018 23:12
Pref Experiment Recipes (Filtered)

source:

curl https://gist.githubusercontent.com/rehandalal/bcd4818457b5697e1d9e98951de1713e/raw/3723219fe3ceb294d353bed1a8bf4692b59a6bc0/filtered-recipes.json | \
    jq -c '.[] | {id: .id, slug: .latest_revision.arguments.slug, pref: .latest_revision.arguments.preferenceName, created: .latest_revision.date_created, creator : .latest_revision.creator | "\(.first_name) \(.last_name)", ft: .latest_revision.filter_expression}' | \
    jq -c '. | "$$ \(.id) $$ \(.created) $$ \(.creator) $$ \(.slug) $$ \(.pref) $$ \(.ft) $$"'  | sed 's/"//g' | sed  's/|/\&#124;/g' | sed 's/\$\$/|/g' | sort
id created creator slug pref name filter expression
311 2017-11-21T18:29:39.911418Z null null pref-flip-autofill-release-1405217-2-2 extensions.formautofill.available ( [normandy.userId]
@mostlygeek
mostlygeek / firefox-heartbeat.js
Created September 6, 2018 23:38
Manually triggering normandy's show-heartbeat action w/ the Fx browser console
// copy + paste these commands into the browser console to trigger
// the heartbeat pop up
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://normandy/lib/Heartbeat.jsm");
ChromeUtils.import("resource://normandy/lib/SandboxManager.jsm");
const recentWindow = Services.wm.getMostRecentNonPBWindow("navigator:browser");
const sm = new SandboxManager();
new Heartbeat(recentWindow, sm, {flowId: "test",