Skip to content

Instantly share code, notes, and snippets.

@andrewrjones
andrewrjones / kinosearch1_dump.pl
Created January 19, 2012 16:18
Dump the KinoSearch1 index.
#!/usr/bin/perl
use strict;
use warnings;
use KinoSearch1::Index::IndexReader;
my $r = KinoSearch1::Index::IndexReader->new( invindex => '/path/to/index' );
# get one or more readers
my @readers = ref $r->{sub_readers} eq 'ARRAY' ? @{ $r->{sub_readers} } : $r;
# Import PowerShell Community Extensions
# Available from http://pscx.codeplex.com/
$pscx = Get-Module -List Pscx
if($m){Import-Module Pscx}
Set-Alias open Invoke-Item
Set-Alias vi gvim # because I forget...
function prompt
{
@andrewrjones
andrewrjones / Gistson.php
Created July 5, 2011 21:37 — forked from phatduckk/Gistson.php
Embed a Gist in Wordpress
<?php
/*
Plugin Name: Gistson - Embedded Gist WP Plugin
Plugin URI: http://arin.me/blog/tag/gistson
Description: Use a shortcode [gist id="12345"] to embed A Gist from http://gist.github.com into your blog
Version: 0.2
Author: Arin Sarkissian
Author URI: http://arin.me
Copyright 2009 Arin Sarkissian, 2011 Andrew Jones
@andrewrjones
andrewrjones / date-from-week-number.pl
Created October 8, 2010 15:59
date-from-week-number.pl
#!perl
use POSIX;
use DateTime;
use Test::More tests => 3;
sub date_from_week_number {
my ( $week_num, $year ) = @_;
$year ||= POSIX::strftime( '%Y', localtime );
@andrewrjones
andrewrjones / extracting-data-from-a-sharepoint-list-with-paging.pl
Created October 7, 2010 12:36
Extract data from SharePoint list - with paging
#!perl
use strict;
use warnings;
use LWP::UserAgent;
use LWP::Debug;
use SOAP::Lite on_action => sub { "$_[0]$_[1]"; };#, +trace => 'debug';
import SOAP::Data 'name', 'value';
@andrewrjones
andrewrjones / quarter-interval.js
Created December 1, 2009 15:57
Quarter as an interval in Simile Timeline.
/*
* This allows you to use a Quarter as an interval in the Simile Timeline.
* See http://andrew-jones.com/2009/12/01/using-a-quarter-interval-with-the-simile-timeline/ for info.
* It has been tested with version 2.3.0 (March 6, 2009). Unlikely to work with other versions.
* For more information on the timeline, see http://www.simile-widgets.org/wiki/Timeline
*/
SimileAjax.DateTime.QUARTER = 11;
(function() {