Instantly share code, notes, and snippets.

# atomicules atomicules

Created Mar 24, 2011
iTunes Script - Add Wishlist Item. Note that this information is probably out of date. It is being added here for reference/archival purposes and relates to a blog post from 2005
View gist:884922
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
 -- This script uses a dummy mp3 file (not supplied) to add a wishlist item to a specified playlist in your library. -- Useful for when the track isn't available from the iTMS (and hence you can't drag this in as a wishlist item) and you want to remember to acquire it later from 'other sources'. You can use the dummy track in a playlist to act as a placeholder until you obtain it. I.e. to layout a running order, etc. -- -- HOW TO USE -- -- Use Quicktime to create a dummy mp3 file. Open a new player and just save as to create a mp3. --Place the dummy file somewhere suitable, amend the path below --Amend the wishlist playlist name if so desired --This script (last time I checked) worked better when complied as an application, otherwise some Apple Event time out errors occur with the dialogs sometimes --The script will prompt for a name, artist and album when run.
Created Oct 5, 2018
View keybase.md

### Keybase proof

I hereby claim:

• I am atomicules on github.
• I am atomicules (https://keybase.io/atomicules) on keybase.
• I have a public key ASBni4NmxizXOetsZ-hSo_BsUcy1AgtbNdlY7YZT_8_9aAo

To claim this, I am signing this object:

Last active Dec 19, 2015
 $Patch for daylight savings time --- src/recur.cpp.orig +++ src/recur.cpp @@ -215,6 +215,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period) int m = current.month (); int d = current.day (); int y = current.year (); + ISO8601d recurrence_date; // Some periods are difficult, because they can be vague. Created May 12, 2013 View sic-1.1-remove-quit-join-messages.diff 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  diff --git a/sic.c b/sic.c index d93c2ec..bc09eee 100644 --- a/sic.c +++ b/sic.c @@ -118,7 +118,7 @@ parsesrv(char *cmd) { par = skip(cmd, ' '); txt = skip(par, ':'); trim(par); - if(!strcmp("PONG", cmd)) + if(!strcmp("PONG", cmd) || !strcmp("QUIT", cmd) || !strcmp("JOIN", cmd)) Created Apr 15, 2013 An old half-finished Applescript where I was looking at automating a download of my pinboard bookmarks into Camino. Been quite a while since I used Camino - dated 2011. View gist:5391599 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  -- pinboard username and password property pbuser : "" property pbpass : "" --Download bookmarks via curl to desktop (because can use shortcut when selecting file for import via UI scripting) do shell script ("cd ~/Desktop; curl https://" & pbuser & ":" & pbpass & "@pinboard.in/export/ -o pinboard.html") --import bookmarks via UI scripting tell application "System Events" Created Mar 3, 2013 Small patch to snownews keybindings to provide more mutt like behaviour. Space does Enter in list view, but next page in reading view. You need to set appropriate user keybindings in conjunction with this patch. View snownews.patch 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  --- interface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/interface.c b/interface.c index 6b28a51..78ca3c2 100644 --- a/interface.c +++ b/interface.c @@ -289,7 +289,7 @@ void UIDisplayItem (struct newsitem * current_item, struct feed * current_feed, Created Jun 3, 2012 http://gitorious.org/fmthings/lasttolibre/blobs/master/libreimport.py Record of slight tweaks I've made to this to use the scrobble.log format View libreimport.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/python #modified version of old import.py # Lastscrape -- recovers data from libre.fm # Copyright (C) 2009 Free Software Foundation, Inc # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or Created Aug 27, 2012 Diff file for patching and building STFL 0.22 on OSX 10.5.8 PPC View gist:3487173 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  diff -crB stfl-0.22-orig/Makefile stfl-0.22/Makefile *** stfl-0.22-orig/Makefile 2012-08-27 10:41:35.000000000 +0100 --- stfl-0.22/Makefile 2012-08-27 10:59:33.000000000 +0100 *************** *** 20,33 **** include Makefile.cfg - export CC = gcc -pthread export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC Created Nov 20, 2011 R and data.table for loop bug/nuance. Code extract for embedding in a blog post View bad.R 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  #Extract of R code #This doesn't work properly #Need to know how many levels nl <- length(levels(datatable$Grouping)) #then how many per graph ng = 8 #Can then loop for (i in 1:ceiling(nl/ng)) {