Skip to content

Instantly share code, notes, and snippets.

View benjaminbauer's full-sized avatar

Benjamin benjaminbauer

  • codecentric
  • Germany
View GitHub Profile
@tommyip
tommyip / venv.fish
Last active July 16, 2024 14:06
venv.fish - Automatically activate/deactivate virtualenv in fish shell
# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f
# Changes:
# * Instead of overriding cd, we detect directory change. This allows the script to work
# for other means of cd, such as z.
# * Update syntax to work with new versions of fish.
# * Handle virtualenvs that are not located in the root of a git directory.
function __auto_source_venv --on-variable PWD --description "Activate/Deactivate virtualenv on directory change"
status --is-command-substitution; and return
@shinyquagsire23
shinyquagsire23 / gist:f7907fdf6b470200702e75a30135caf3
Created January 8, 2020 05:48
Philips Hue BLE Services and Characteristics (WIP)
DeviceInfo(softwareRevision, isOn,
SceneLightState(color, powerOnBehavior, deviceInfo
Light(id,
Capabilities(dimmable, customState
PowerOnBehavior(option
hueplay, huebloom, hueiris, huelightstrip, huego, plug, bollard, wallspot, groundspot, flexiblelamp, wallshade, walllantern
[ea:44:13:bd:db:59] Service [b8843add-0000-4aa1-8794-c3f462030bda] Unknown, ble_firmware_update?
[ea:44:13:bd:db:59] Characteristic [b8843add-0004-4aa1-8794-c3f462030bda]
@aaronshaf
aaronshaf / bookmarklet-expanded.js
Last active May 13, 2024 14:35
Copy text from Amazon's Cloud Reader. Helpful for students that need block quotes.
javascript: (function () {
new_window = window.open();
new_window.document.body.innerHTML = $("iframe")
.contents()
.find("iframe")
.contents()
.find("body")
.get(1).innerHTML;
new_window.document.body.querySelector("#content-overlays").remove();
})();
@brendanjerwin
brendanjerwin / writer
Created May 28, 2011 00:45
open iA writer from the command line
#! /bin/bash
open $1 -a /Applications/iA\ Writer.app