Skip to content

Instantly share code, notes, and snippets.

@cimm
cimm / NEMA2KML.scpt
Created January 16, 2010 23:43
This AppleScript converts a NMEA input file and converts all real coordinates to Google placemarks in a KML file.
property script_name : "NMEA2KML"
property script_version : "0.3"
property script_description : "This script converts a NMEA input file and converts all real coordinates to Google placemarks in a KML file."
property script_copyright : "Creative Commons Attribution 3.0 License"
property script_author : "Simon Schoeters"
property script_website : "http://www.suffix.be/"
-- Get the file and its path
set filePath to (choose file with prompt "Select a NMEA file:") as Unicode text
set filePath to replace_chars(filePath, ":", "/")
@cimm
cimm / RepairiPhotoDates.scpt
Created January 16, 2010 23:48
AppleScript that gets the selected photos in iPhoto, extracts the iPhoto date and adds it in the photo EXIF data.
property script_name : "RepairiPhotoDates"
property script_version : "0.2"
property script_description : "Gets the selected photos in iPhoto, extracts the iPhoto date and adds it in the photo EXIF data."
property script_copyright : "Creative Commons Attribution 3.0 License"
property script_author : "Simon Schoeters"
property script_website : "http://www.suffix.be/"
-- Open iPhoto, select the photos you need and run the script, it will replace the date in the EXIF headers with the data iPhoto shows. You'll need ExifTool by Phil Harvey (www.sno.phy.queensu.ca/~phil/exiftool/) installed to make this work.
tell application "iPhoto"
@cimm
cimm / gist:250423
Created December 6, 2009 21:14
Creates a github like punch card graphic in SVG
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
<!-- Set the light gray background -->
<rect width="740px" height="330px" style="fill:#efefef"/>
<!-- Set the x axis labels and gridlines -->
<text x="10px" y="30px" font-family="Verdana, sans-serif" font-size="11px" fill="#333">mon</text>
<text x="10px" y="70px" font-family="Verdana, sans-serif" font-size="11px" fill="#333">tue</text>
@cimm
cimm / AuthorDelegate.qml
Created March 27, 2015 09:02
Nested elements in a QML XmlListModel
import QtQuick 2.0
ListView {
property int parentIndex
height: 20
model: MyXmlListModel{
query: "/papers/paper["+parentIndex+"]/authors/author"
}