Skip to content

Instantly share code, notes, and snippets.

View gedankenexperimenter's full-sized avatar

Michael Richters gedankenexperimenter

  • Winnipeg, MB
View GitHub Profile
@gedankenexperimenter
gedankenexperimenter / kaleidoscope-namespace-comments.sh
Last active March 24, 2022 04:57
The equivalent of how I added namespace comments to Kaleidoscope source code
#!/usr/bin/env bash
cd "${KALEIDOSCOPE_DIR}"
cat > .clang-format <<EOF
---
BasedOnStyle: Google
---
Language: Cpp
@gedankenexperimenter
gedankenexperimenter / trace.log
Last active March 23, 2022 14:58
Failing `pyenv install 3.10.3`
+(/opt/homebrew/bin/pyenv:23): enable -f /opt/homebrew/bin/../libexec/pyenv-realpath.dylib realpath
+(/opt/homebrew/bin/pyenv:30): '[' -z '' ']'
++(/opt/homebrew/bin/pyenv:32): type -P greadlink readlink
++(/opt/homebrew/bin/pyenv:32): head -1
+(/opt/homebrew/bin/pyenv:32): READLINK=/usr/bin/readlink
+(/opt/homebrew/bin/pyenv:33): '[' -n /usr/bin/readlink ']'
+(/opt/homebrew/bin/pyenv:58): '[' -z /Users/merlin/.pyenv ']'
+(/opt/homebrew/bin/pyenv:61): PYENV_ROOT=/Users/merlin/.pyenv
+(/opt/homebrew/bin/pyenv:63): export PYENV_ROOT
+(/opt/homebrew/bin/pyenv:65): '[' -z '' ']'
@gedankenexperimenter
gedankenexperimenter / kaleidoscope-persist.txt
Last active March 5, 2022 22:21
Contents of /kaleidoscope-persist & /kaleidoscope in Docker
/kaleidoscope-persist
/kaleidoscope-persist/temp
/kaleidoscope-persist/temp/arduino-cores
/kaleidoscope-persist/temp/arduino-cores/core
/kaleidoscope-persist/temp/arduino-cores/core/core_keyboardio_virtual_model01_7e313dee64e41aaa1b1f56b756616956.a
/kaleidoscope-persist/temp/build
/kaleidoscope-persist/temp/build/3456739503-1061.ino
/kaleidoscope-persist/temp/build/3456739503-1061.ino/libraries
/kaleidoscope-persist/temp/build/3456739503-1061.ino/libraries/kaleidoscope
/kaleidoscope-persist/temp/build/3456739503-1061.ino/libraries/kaleidoscope/kaleidoscope
@gedankenexperimenter
gedankenexperimenter / sync-ks-libs.sh
Last active March 5, 2022 21:58
Sync libs for running docker simulator tests for Kaleidoscope
#!/bin/bash
# Synchronize the copy of a library used for building Kaleidoscope
# (i.e. KeyboardioHID) that will be used inside the Docker container with the
# one that is being used for normal builds. We do this by getting the git
# revision of the repo on the host, adding that repo as a remote for the docker
# version, and checking out the same revision there.
sync_docker_lib () {
LIB="$1"
@gedankenexperimenter
gedankenexperimenter / chrysalis-697.json
Created June 17, 2021 14:04
JSON from Chrysalis issue #697
{
"timestamp": "2021-06-17T10:46:31.115Z",
"uuid": "76e64156-8c5a-4f72-9ae7-65ab8e87057f",
"chrysalis": {"version": "0.8.4"},
"os": {
"platform": "win32",
"distro": "Microsoft Windows 10 Home",
"release": "10.0.19042",
"codename": "",
"kernel": "10.0.19042",
@gedankenexperimenter
gedankenexperimenter / AppSwitcherPlugin.ino
Last active July 5, 2022 13:20
Custom Kaleidoscope Plugin for `alt`+`A` to switch apps (on macOS), corrected
namespace kaleidoscope {
namespace plugin {
class AppSwitcher : public kaleidoscope::Plugin {
public:
static constexpr KeyAddr invalid_addr{KeyAddr::invalid_state};
AppSwitcher() {}
EventHandlerResult onKeyswitchEvent(Key &key,
KeyAddr key_addr,
@gedankenexperimenter
gedankenexperimenter / AppSwitcher.ino
Created October 9, 2020 20:59
Custom Kaleidoscope Plugin for `alt`+`A` to switch apps (on macOS)
namespace kaleidoscope {
namespace plugin {
class AppSwitcher : public kaleidoscope::Plugin {
public:
static constexpr KeyAddr invalid_addr{KeyAddr::invalid_state};
AppSwitcher() {}
EventHandlerResult onKeyswitchEvent(Key &key,
KeyAddr key_addr,
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
@gedankenexperimenter
gedankenexperimenter / export-to-csv.gs
Created June 13, 2018 16:31 — forked from mderazon/export-to-csv.gs
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);