This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enable double clicking from the Macintosh Finder or the Windows Explorer | |
#target photoshop | |
const ScriptResult = | |
{ | |
CANCEL: 'cancel' // quit, returning 'cancel' (dont localize) makes the actions palette not record our script | |
}; | |
function exportGroups(document, folder, retina) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
percentage=$( ioreg -rS -c BNBMouseDevice -k BatteryPercent -d 1 | grep BatteryPercent | tail -1 | awk '{print $NF}' ) | |
if [ "$percentage" == "" ]; then | |
echo "Disconnected"; | |
else | |
if ((50 <= percentage)); then | |
color=32; #green | |
elif ((20 <= percentage)); then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright © 2012 Yuri Kotov | |
// | |
/*! | |
@function ADVGetExecutionTime | |
@abstract Measure code execution time | |
@param block | |
code block to execute | |
@result elapsed time (in nanoseconds) |
NewerOlder