-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4cdc259
Showing
8 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>action</key> | ||
<false/> | ||
<key>category</key> | ||
<string>SCRIPTS</string> | ||
<key>command</key> | ||
<string>#!/bin/bash | ||
# Set your API Token here (get it at "https://pinboard.in/settings/password") | ||
token="" | ||
# Set your prefered browser (comment with a "#" the one you do not want to use) | ||
browser="Google Chrome" | ||
#browser="Safari" | ||
# Get browser's frontmost tab's url and title, and set the tags for Pinboard | ||
# Arguments must be url-encoded (hence the 'perl') | ||
if [[ ${browser} == "Google Chrome" ]]; then | ||
url=$(osascript -e 'tell application "Google Chrome" to return URL of active tab of front window' | perl -MURI::Escape -wlne 'print uri_escape ($_)') | ||
title=$(osascript -e 'tell application "Google Chrome" to return title of active tab of front window' | perl -MURI::Escape -wlne 'print uri_escape ($_)') | ||
elif [[ ${browser} == "Safari" ]]; then | ||
url=$(osascript -e 'tell application "Safari" to return URL of front document' | perl -MURI::Escape -wlne 'print uri_escape ($_)') | ||
title=$(osascript -e 'tell application "Safari" to return name of front document' | perl -MURI::Escape -wlne 'print uri_escape ($_)') | ||
fi | ||
tags=$(echo {query} | perl -MURI::Escape -wlne 'print uri_escape ($_)') | ||
# Add the bookmark | ||
curl --silent "https://api.pinboard.in/v1/posts/add?url=${url}&description=${title}&tags=${tags}&auth_token=${token}"</string> | ||
<key>disabled</key> | ||
<false/> | ||
<key>escapedollar</key> | ||
<false/> | ||
<key>escapequery</key> | ||
<false/> | ||
<key>escapequerybackquotes</key> | ||
<false/> | ||
<key>escapequerybrackets</key> | ||
<false/> | ||
<key>escapequeryquotes</key> | ||
<false/> | ||
<key>escapequerysemicolons</key> | ||
<false/> | ||
<key>growloutput</key> | ||
<true/> | ||
<key>growloutputsticky</key> | ||
<false/> | ||
<key>keyword</key> | ||
<string>pin</string> | ||
<key>logging</key> | ||
<false/> | ||
<key>multifileargs</key> | ||
<false/> | ||
<key>parameter</key> | ||
<integer>2</integer> | ||
<key>silent</key> | ||
<true/> | ||
<key>subtitle</key> | ||
<string>Takes arguments as tags — adds your browser's frontmost tab as a pinboard bookmark</string> | ||
<key>title</key> | ||
<string>Pinadd</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>creator</key> | ||
<string>Vítor Galvão</string> | ||
<key>website</key> | ||
<string>http://vitorgalvao.com/</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Collection of Alfred Extension scripts | ||
|
||
### Pinadd | ||
Takes arguments as tags, and adds your browser's (Safari or Chrome) frontmost tab as a pinboard bookmark. | ||
(You need to add your Pinboard's API Token (get it at "https://pinboard.in/settings/password") on the line that says “token=""”) | ||
(If you use Safari instead of Chrome, you need to change that option in the script by commenting the respective line. More instructions on the extension itself) | ||
|
||
### StrongPassword | ||
Get a strong password from https://www.grc.com/passwords.htm directly to the clipboard |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>action</key> | ||
<false/> | ||
<key>category</key> | ||
<string>SCRIPTS</string> | ||
<key>command</key> | ||
<string>#!/bin/bash | ||
curl 'https://www.grc.com/passwords.htm' | grep 'ASCII characters:' | perl -MHTML::Entities -ne 's/.*2>|<.*//g; print decode_entities($_)' | tr -d '\n' | pbcopy | ||
echo "Password copied"</string> | ||
<key>disabled</key> | ||
<false/> | ||
<key>escapedollar</key> | ||
<false/> | ||
<key>escapequery</key> | ||
<false/> | ||
<key>escapequerybackquotes</key> | ||
<false/> | ||
<key>escapequerybrackets</key> | ||
<false/> | ||
<key>escapequeryquotes</key> | ||
<false/> | ||
<key>escapequerysemicolons</key> | ||
<false/> | ||
<key>growloutput</key> | ||
<true/> | ||
<key>growloutputsticky</key> | ||
<false/> | ||
<key>keyword</key> | ||
<string>strongpassword</string> | ||
<key>logging</key> | ||
<false/> | ||
<key>multifileargs</key> | ||
<false/> | ||
<key>parameter</key> | ||
<integer>1</integer> | ||
<key>silent</key> | ||
<true/> | ||
<key>subtitle</key> | ||
<string>Get a strong password from https://www.grc.com/passwords.htm directly to the clipboard</string> | ||
<key>title</key> | ||
<string>StrongPassword</string> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>creator</key> | ||
<string>Vítor Galvão</string> | ||
<key>website</key> | ||
<string>http://vitorgalvao.com/</string> | ||
</dict> | ||
</plist> |