View Fargo Flickr Search
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
var t = op.getLineText();; | |
var theurl = "https://api.flickr.com/services/feeds/photos_public.gne?tags=" + t + "&format=opml"; | |
http.readUrl(theurl, | |
function(data) { | |
xmlDoc = $.parseXML(data); | |
var ii = 0;; | |
$xml = $(xmlDoc), | |
$xml.find("entry").each(function() { | |
ii++; | |
if (ii > 5) { |
View tablinks to clip
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
tell application "Safari" | |
set themax to number of tabs of window 1 | |
set thelist to "" | |
repeat with x from 1 to themax | |
set thelist to thelist & "<a href=" & quote & (URL of tab x of window 1) & quote & ">" & (name of tab x of window 1) & "</a>" & return | |
end repeat | |
set the clipboard to thelist | |
end tell |
View Safari Tab links to markdown list
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
tell application "Safari" | |
set themax to number of tabs of window 1 | |
set titlelist to "" | |
set thelist to "" | |
repeat with x from 1 to themax | |
set titlelist to titlelist & "[" & name of tab x of window 1 & "][" & x & "]" & return | |
set thelist to thelist & "[" & x & "]:" & (URL of tab x of window 1) & return | |
end repeat | |
set the clipboard to titlelist & return & return & thelist |
View image to width
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
tell application "Finder" | |
set files_ to selection | |
set w to the text returned of (display dialog "What width?" default answer "500") | |
repeat with file_ in files_ | |
repeat 1 times | |
--set imgkind to (kind of file_) | |
--if (imgkind does not contain "Image") then | |
-- exit repeat -- 1 times |
View Find Flickr Photo.scpt
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
tell application "Finder" | |
set files_ to selection | |
repeat with file_ in files_ | |
set imgkind to (kind of file_) | |
repeat 1 times | |
set imgkind to (kind of file_) | |
if (imgkind does not contain "Image") then |
View pinboardrecent.py
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#Most of this based on a script from http://leancrew.com/all-this/2015/12/homemade-rss-aggregator-followup/ | |
#I added the thumbnailing with webkit2png and cut it down to one feed. | |
#TODO clean up old images, don't regenerate existing images, spearate css from template | |
import feedparser | |
import time | |
from datetime import datetime, timedelta | |
import pytz |
View Sync gh-pages + master branches
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
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ | |
$ git add . | |
$ git status // to see what changes are going to be commited | |
$ git commit -m 'Some descriptive commit message' | |
$ git push origin master | |
$ git checkout gh-pages // go to the gh-pages branch | |
$ git rebase master // bring gh-pages up to date with master | |
$ git push origin gh-pages // commit the changes |
View isRetina.scpt
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
on isRetina() | |
set ret to (do shell script "system_profiler SPDisplaysDataType | awk '/Retina:/{print $2}'") | |
if ret is "Yes" then | |
return true | |
else | |
return false | |
end if | |
end isRetina |
View auto-complete-gifs
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
--needs gifsicle http://www.lcdf.org/gifsicle/ | |
-- updated for retina screen | |
set thetext to text returned of (display dialog "What do you want to autocomplete?" default answer "I hate") | |
set theFileName to change_case_of(thetext, "lower") & ".gif" | |
set tempdir to POSIX path of (path to temporary items from user domain) & "autogifs/" | |
try | |
do shell script "mkdir " & tempdir | |
end try |
OlderNewer