Skip to content

Instantly share code, notes, and snippets.

[alias]
prunable = "!f() { \
: git log ; \
target=\"$1\"; \
[ -z \"$target\" ] && target=$(git for-each-ref --format=\"%(refname:short)\" --count=1 refs/remotes/m/); \
if [ -z \"$target\" ]; then echo \"No remote branches found in refs/remotes/m/\"; return 1; fi; \
echo \"# git branch --merged shows merged if same commit ID only\" ;\
echo \"# if rebased, git cherry can show branch HEAD is merged\" ;\
echo \"# git log grep will check latest commit subject only. if amended, this status won't be accurate\" ;\
echo \"# Comparing against $target...\"; \
@lawm
lawm / everbrite-mod.md
Last active October 20, 2017 07:38
Modifying EverBrite solar light to turn off at night

EverBrite is a solar powered motion sensing LED light:

everbrite-orig

Amazon and eBay also have lots of similarly looking lights by different brands.

Original Behavior

There are various versions, but at least on the EverBrite the behavior is:

  • When the sun is out, charging the solar panel, the light is off
  • At night, if motion is detected, the light turns on to a bright level