Skip to content

Instantly share code, notes, and snippets.

View odenak's full-sized avatar

John Li odenak

View GitHub Profile
@odenak
odenak / canon-airprint-rename.sh
Last active May 1, 2024 22:18
Canon M644Cdw AirPrint Rename
#!/bin/sh
# This script will log in to Canon MF644Cdw's Remote UI and rename the AirPrint/Bonjour/mDNS name.
# This is a workaround to Canon MF644Cdw AirPrint keeps renaming itself.
# You can either run this manually or run it as a cronjob.
# Reference: https://community.usa.canon.com/t5/Printer-Software-Networking/imageCLASS-MF644Cdw-Airprint-name-keeps-changing/td-p/298543/page/2
# === CONFIG ===
PRINTER_HOST="192.168.#.#" # Canon MF644 local IP
PRINTER_PASS="password" # Canon Remote UI System Manager Mode Password
@odenak
odenak / testfauxmo.ino
Created May 15, 2017 22:04
simple fauxmo tester for alexa
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "fauxmoESP.h"
#define SERIAL_BAUDRATE 115200
#define WIFI_SSID "..."
#define WIFI_PASS "..."
fauxmoESP fauxmo;
@odenak
odenak / umbrella
Created October 25, 2016 06:28 — forked from quinncomendant/umbrella
OpenDNS umbrella start/stop script for Mac OS X. This makes it easy to turn umbrella off temporarily, or get its status.
#!/usr/bin/env bash
# Quinn Comendant <quinn@strangecode.com>
# https://gist.github.com/quinncomendant/3be731567e529415d5ee
# Since 25 Jan 2015
# Version 1.1
CMD=$1;
if [[ `id -u` = 0 ]]; then
@odenak
odenak / private.xml
Last active March 24, 2019 18:08
Karabiner Swap CMD and OPTION for Varmilo VB87M Bluetooth Keyboard VID: 0x1915, PID: 0xEEEE
<?xml version="1.0"?>
<root>
<item>
<name>Swap Command and Option for Varmilo VB87M Bluetooth Keyboard (vid/pid: 0x1915,0xEEEE)</name>
<identifier>private.swap_cmd_option_varmilo_vb87m</identifier>
<block>
<device_only>DeviceVendor::RawValue::0x1915, DeviceProduct::RawValue::0xEEEE</device_only>
<autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>
@odenak
odenak / private.xml
Last active April 6, 2023 22:40
Karabiner Fn + HJKL / IJKL / WASD / ESDF as arrow keys
<?xml version="1.0"?>
<root>
<item>
<name>F19 to Fn</name>
<appendix>You can use Seil to map CapsLock to F19 (keycode 80)</appendix>
<identifier>private.f19_to_fn</name>
<autogen> __KeyToKey__ KeyCode::F19, KeyCode::FN </autogen>
</item>
<item>
<name>Fn + HJKL as arrows</name>