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
duplicates.step2$days.between <- sapply( | |
1:nrow(duplicates.step2), | |
function(q) { | |
step2id <- as.character(duplicates.step2.dt[,id][q]) #as.character is important bit! | |
temp <- min( | |
difftime( | |
duplicates.step2.dt[, Date][q], | |
step1.dt[step2id]$Date, #No need to crazily create another data.table | |
units=c("days") | |
) |
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
"IP Address specific | |
"------------------- | |
"(i.e. Home or Work) | |
if ip == -1 | |
"Set proxies, Python urllib2 (TwitVim, Simplenote.vim) will automatically pick | |
"these up | |
let $http_proxy = 'http://<username>:<password>@<proxy-url>:<proxy-port>' | |
let $https_proxy = 'http://<username>:<password>@<proxy-url>:<proxy-port>' | |
endif |
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
import urllib | |
import urllib2 | |
import base64 | |
import json | |
snuser = "" | |
snpassword = "" | |
proxyurl = "<proxy url>:<proxy port>" | |
proxylogin = "<proxy username>:<proxy password>" |
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
#Bookmarklet to generate QIF for Recent Item and Previous Statement pages on SMILE.co.uk bank | |
#Will (try to) open a new popup window where you will have to either: | |
#a) Copy text from and paste to text editor (Chrome) | |
#b) Save the page as a text file (Firefox) | |
# | |
#Written in Coffescript, but just use http://javascriptcompressor.com/ to compress the | |
#compiled javascript so you have a bookmarklet. | |
data = document.getElementsByClassName("summaryTable")[0].children[1].children |
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
/* | |
Bookmark bar icons, used on OSX and Windows XP | |
Because I do not understand why Firefox tries to emulate Safari on OSX. | |
I want the exact opposite: Icons and no text. | |
This also fixes the default circular hover. | |
*/ | |
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
#personal-bookmarks toolbarbutton { | |
/*This for Windows*/ |
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
--Camino Pinboard save tabs | |
-- An Applescript to Save Open Tabs to Pinboard, using the Save Tabs functionality: | |
-- http://blog.pinboard.in/2011/04/new_save_tabs_feature/ | |
-- Uses francois2metz fake html5-FormData since Gecko 1.9 doesn't have this | |
-- https://github.com/francois2metz/html5-formdata | |
-- BUT DOESN'T BLOODY WELL WORK BECAUSE OF A RESTRICTION IN GECKO 1.9 | |
-- Gecko 1.9 preflights all requests except from text/plain which screws the whole thing up | |
-- (https://developer.mozilla.org/en/http_access_control#Preflighted_requests) | |
-- Oh well, it was a nice idea. |
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 to Camino | |
# | |
# A Ruby script to import/update Pinboard bookmarks into Camino | |
# This is a evolution of this Applescript: https://gist.github.com/835932 which simply deleted and | |
# replaced a bookmarks collection. This Ruby script attempts to update, rather than delete and replace, | |
# so Camino bookmark visit counts are preserved, etc. | |
# | |
# IT IS VERY SLOW! | |
# | |
# Really, it is. Took about 35 mins to run through a Camino bookmarks file with 2003 existing "pinboard" |
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
-- Selection Sort in Haskell | |
-- | |
-- Cheating by using IORef for mutable variables since I don't know what I'm doing | |
-- with Haskell, although do have an inkling that the benefit of Haskell is that | |
-- all of below can be done in about three lines. | |
-- | |
-- Assumes integer input only. | |
import Data.IORef | |
import Data.List.Split -- cabal install split |
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
// To install this plugin simply place in your FCE plugins directory in your home folder | |
// In FCE 3 this is: | |
// ~/Library/Preferences/Final Cut Express User Data/Plugins | |
// | |
// All my notes and comments are included | |
// | |
// With inspiration from and thanks to: | |
// http://www.joesfilters.com/ | |
// http://www.mattias.nu/plugins/ | |
// |
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
// FCE Timecode Display - by PieroF and i5m - v3.0.1 - 01-Feb-2005 | |
// | |
// LICENSCE | |
// ======== | |
// | |
// This plugin is freeware. Do what the hell you want with it. | |
// | |
// CONTACT | |
// ======= | |
// |