Skip to content

Instantly share code, notes, and snippets.

@bezhermoso
bezhermoso / notification-actions.applescript
Last active February 11, 2023 09:54
Handly AppleScripts to manage OS X notifications. (Use in Automator, bind to keyboard shortcuts via BetterTouchTool, etc.) Inspired by http://apple.stackexchange.com/a/155736
# Close all notifications
my closeNotifications()
on closeNotifications()
tell application "System Events" to tell process "Notification Center"
set theWindows to every window
repeat with i from 1 to number of items in theWindows
set this_item to item i of theWindows
try
click button 1 of this_item
@yingted
yingted / copy-clipboard-from-android.sh
Created September 14, 2013 05:43
Copy Android clipboard over ssh or adb to the local clipboard. Set login to -d or -e to force adb to only look for devices or emulators. See also copy-clipboard-to-android.sh.
#!/bin/sh
# Copies the Android clipboard to local X11 secondary buffer.
# Useful for debugging.
limit=33
delay=3000
login=my-android-ssh-name # ssh $login or adb $login shell should log you in
while getopts 't:h:q' opt
do
case $opt in