This file contains hidden or 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
| # https://help.dropbox.com/sync/ignored-files#mac2 | |
| # file | |
| xattr -w com.dropbox.ignored 1 '/Users/yourname/Dropbox (Personal)/YourFileName.pdf' | |
| # all files in your folder, note trailing slash | |
| xattr -w com.dropbox.ignored 1 '/Users/yourname/Dropbox (Personal)/your_folder/' | |
| # to remove, delete the xattr, may need to restart Dropbox for it to see the change | |
| xattr -d com.dropbox.ignored '/Users/yourname/Dropbox (Personal)/your_folder/' |
This file contains hidden or 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
| # Looker splits query strings with commas | |
| # To filter for a string containing a comma you need to escape the comma or Looker splits the string at the comma | |
| # The documentation is poor in this area | |
| # Example | |
| Plumbers, heating engineers and technicians | |
| # Is split to | |
| Plumbers | |
| heating engineers and technicians |
This file contains hidden or 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
| pkill -f "string" |
This file contains hidden or 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
| grep "your_string" your_file.csv | wc -l |
This file contains hidden or 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
| // Jira JQL Done, updated today, or updated yesterday, or updated Friday | |
| status = Done AND (updated > startofday() OR (updated > -1d) OR (updated <= startofWeek() AND updated > -3d)) | |
| // Jira JQL resolved, resolved today, or resolved yesterday, or resolved Friday | |
| status = Done AND (resolved > startofday() OR resolved > -1d OR resolved <= startofWeek() AND resolved > -3d) |
This file contains hidden or 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
| AND Labels != XYZ | |
| # Jira returns only cards with a label but not XYZ | |
| # does not return cards without a label, which is unexpected when you first think of it | |
| # is returning cards with labels, specifically labels !=XYZ | |
| # Solution: be explicit | |
| AND (Labels is null OR Labels != XYZ) | |
| # returns all cards without a label or a label which is not XYZ |
This file contains hidden or 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
| osascript -e 'quit app "APPLICATIONNAME"' | |
| i.e. | |
| osascript -e 'quit app "Calculator"' | |
| I used this before running a rsync (well Grsync actually) script, | |
| so my database application wasn't running while it was backed up. |
This file contains hidden or 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
| on run {input, parameters} | |
| (* This script takes a selection of files, appends them to individual emails to a predetermined address | |
| using the filename as the subject of the email and then sends it *) | |
| set mgPeople to "YourSenderName" | |
| set mgAddress to "[email protected]" | |
| --set mgAddress to "[email protected]" --debug address | |
| set theSender to "[email protected]" | |
| set mgContent to "" |
This file contains hidden or 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
| //Open Terminal | |
| cd ~/Library/Preferences | |
| rm com.apple.finder.plist //Delete Finder's property list | |
| sudo killall Finder //Kills Finder which should prompt OS X to restart it automatically | |
| //Optional manual restart of Finder | |
| open /System/Library/CoreServices/Finder.app | |
| //Adapted from http://www.jgoode.com/easy-fix-for-mac-finder-preview-thumbnails-not-displaying/ |
This file contains hidden or 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
| on run {input, parameters} | |
| tell application "Finder" | |
| set fileName to selection as alias | |
| set fileName to POSIX path of fileName | |
| set firstPart to "[img[" & fileName | |
| set imagePath to firstPart & "]]" | |
| set the clipboard to imagePath | |
| end tell |
NewerOlder