Skip to content

Instantly share code, notes, and snippets.

@gregorriegler
gregorriegler / dom_inspector.css
Created December 27, 2020 14:27
hacky css inspector for html uis
* {
border: 1px solid red;
}
*:before {
content: "id: " attr(id) " class: " attr(class);
}
@gregorriegler
gregorriegler / ducky.md
Created August 11, 2020 20:46 — forked from schmich/ducky.md
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@gregorriegler
gregorriegler / git pretty stat
Created August 10, 2020 16:54 — forked from sephiroth74/git pretty stat
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'
@gregorriegler
gregorriegler / intellij-live-templates.java
Created August 4, 2019 19:12
intellij live templates
// log live template
private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger($CLASS$.class);
// equals + hashcode live template
@Override
public boolean equals(Object other) {
return org.apache.commons.lang3.builder.EqualsBuilder.reflectionEquals(this, other);
}
@Override