Skip to content

Instantly share code, notes, and snippets.

@tuxtina
tuxtina / TagCloud.html
Created January 31, 2015 11:22
Delicious JavaScript Tag API Replacement (List + Simple Tag Cloud)
<html>
<head>
<title>Delicious JavaScript Tag API Replacement (Tag Cloud)</title>
</head>
<body>
<div id="deliciousPlaceholder"></div>
<script type="text/javascript">
"use strict";
var username = "delicious";
@tuxtina
tuxtina / gist:5694143
Created June 2, 2013 16:59
Quick & dirty PHP syntax check on save for use with TextWrangler. Put into ~/Library/ApplicationSupport/TextWrangler/Attachment Scripts/Document.scpt.
on documentDidSave(currentDoc)
set fileName to the name of the currentDoc as string
if ((offset of ".php" in fileName) > 1) then
set f to the file of the currentDoc
set filePath to the POSIX path of f
set lintOutput to do shell script "php -l \"" & filePath & "\"; exit 0"
if ((offset of "No syntax errors detected" in lintOutput) 1) then
display dialog lintOutput buttons {"OK"} default button "OK" with title "PHP Syntax Error"
end if
end if