Skip to content

Instantly share code, notes, and snippets.


atomicules atomicules

View GitHub Profile
atomicules / gist:884922
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 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.
-- 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.

Keybase proof

I hereby claim:

  • I am atomicules on github.
  • I am atomicules ( on keybase.
  • I have a public key ASBni4NmxizXOetsZ-hSo_BsUcy1AgtbNdlY7YZT_8_9aAo

To claim this, I am signing this object:

atomicules / tw-13-2014-11-11.patch
Last active Dec 19, 2015
Patch for TW-13 in Taskwarrior
View tw-13-2014-11-11.patch
$ 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 = ();
int y = current.year ();
+ ISO8601d recurrence_date;
// Some periods are difficult, because they can be vague.
View sic-1.1-remove-quit-join-messages.diff
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, ':');
- if(!strcmp("PONG", cmd))
+ if(!strcmp("PONG", cmd) || !strcmp("QUIT", cmd) || !strcmp("JOIN", cmd))
atomicules / gist:5391599
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
-- 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 & " -o pinboard.html")
--import bookmarks via UI scripting
tell application "System Events"
atomicules / snownews.patch
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
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,
atomicules /
Created Jun 3, 2012 Record of slight tweaks I've made to this to use the scrobble.log format
#modified version of old
# Lastscrape -- recovers data from
# 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
atomicules / gist:3487173
Created Aug 27, 2012
Diff file for patching and building STFL 0.22 on OSX 10.5.8 PPC
View gist:3487173
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
atomicules / bad.R
Created Nov 20, 2011
R and data.table for loop bug/nuance. Code extract for embedding in a blog post
View bad.R
#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)) {
atomicules / reference_for_pgfsweave-tikz_option.Rnw
Created Nov 20, 2011
Some Sweave file extracts for embedding in a blog post, showing different approaches for looping through Lattice plots for Sweave vs Tikz/pgfSweave
View reference_for_pgfsweave-tikz_option.Rnw
%Reference for pgfSweave / Tikz option
%Sweave file extract
<<fig=TRUE, tikz=T>>=
xyplot(Y ~ Date | Grouping, datatable[levels(datatable$Grouping)[1:8]], layout=c(1,8), ylim=c(-100,100), xlim=as.Date(c("2011-01-01", "2011-07-01")) )