Skip to content

Instantly share code, notes, and snippets.

View meramsey's full-sized avatar

Michael Ramsey meramsey

View GitHub Profile
@meramsey
meramsey / fix-webcams.sh
Created September 28, 2021 13:25 — forked from shimon/fix-webcams.sh
Linux shell script to disable an internal webcam if an external one is attached, or enable the internal one if not.
#!/bin/bash
# Quick script to disable an internal webcam if an external one is attached, or
# enable the internal one if the external one's not attached.
# by Shimon Rura, 25 Jan 2018. In the public domain.
# To use, run `lsusb` and identify the lines for your internal and external camera devices.
# For example, mine are:
# internal:
@meramsey
meramsey / README.md
Last active October 11, 2021 20:31
Add Copy Path to nautilus

Add Copy Path to nautilus

Download the file then move it and make executable and restart nautilus to see the Copy Path icon

wget https://gist.githubusercontent.com/meramsey/f1d20da371de82e801df19c92a673e63/raw/2bb9cb9007f21e85b00aade70d5db21c41b44f44/nautilus-copy-paths.py
sudo mv nautilus-copy-paths.py /usr/share/nautilus-python/extensions/nautilus-copy-paths.py
sudo chmod +x /usr/share/nautilus-python/extensions/nautilus-copy-paths.py
nautilus -q

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@meramsey
meramsey / gist:b9c98032a34612a1a29f9fd2059156a5
Created February 4, 2023 01:07 — forked from lavalake/gist:d83a5bc14284161433019475013996d1
Android activity manager "am" command help
adb shell am
Activity manager (activity) commands:
help
Print this help text.
start-activity [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--sampling INTERVAL] [--streaming] [-R COUNT] [-S]
[--track-allocation] [--user <USER_ID> | current] <INTENT>
Start an Activity. Options are:
-D: enable debugging
-N: enable native debugging