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) { |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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/bash | |
#2018 additions | |
#needs jhead which I installed with homebrew | |
#jhead auto rotates images according to the exif Orientation which ffmpeg does not respect | |
#if the photos do not need rotated then you could remove the jhead line below | |
#sox to loop audio. I installed with homebrew | |
#my video was longer than the audio, I just create a loop of 3 with sox and use that. Could up the number iif you have more photos than me |
OlderNewer