Skip to content

Instantly share code, notes, and snippets.

@garyhodgson
garyhodgson / ubiquity-tumblr.js
Created December 21, 2008 12:58
Ubiquity command for interacting with Tumblr
Tumblr = {
addUsername : function(username) { Application.prefs.setValue("tumblr_user_username", username);},
getUsername : function() { return Application.prefs.get("tumblr_user_username").value;},
addGroup : function(group) { Application.prefs.setValue("tumblr_group", group);},
getGroup : function() { return Application.prefs.get("tumblr_group").value;},
addPassword : function(password) { Application.prefs.setValue("tumblr_user_password", password); },
getPassword : function() { return Application.prefs.get("tumblr_user_password").value; },
everythingIsOK : function() {
return Application.prefs.has("tumblr_user_username")
&& Application.prefs.has("tumblr_user_password")
/**
* description: "A collection of commands that interact with <a href=\"http://rememberthemilk.com\">Remember the Milk<a>"
* name: "Gary Hodgson",
* homepage: "http://www.garyhodgson.com/ubiquity/",
* source: "http://github.com/garyhodgson/ubiquity-rtm-api",
* email: "contact@garyhodgson.com",
* license: "MPL",
* version: "0.3.9"
*/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script src="jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="processing.js" type="text/javascript" charset="utf-8"></script>
<title>asd</title>
</head>
// This code is MIT licensed: http://creativecommons.org/licenses/MIT/
// Zenbe Inc (2009).
// Ensure our Zenbe namespaces exist.
window.zen = window.zen || {};
window.zen.util = window.zen.util || {};
/**
* The DropManager class provides a pleasant API for observing HTML5 drag-n-drop
* events, cleaning up the data that they return, and triggering the appropriate
<html>
<head>
<script>
function dodrop(event)
{
var dt = event.dataTransfer;
var files = dt.files;
var count = files.length;
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
dbDriver = 'org.hsqldb.jdbcDriver'
dbUrl = 'jdbc:hsqldb:file:db/testdb;shutdown=true'
path ( id:'dbdeployClasspath' )
{
fileset( dir:'..' , includes:'dbdeploy-ant-*.jar' )
}
path ( id:'hsqlClasspath' )
{
@garyhodgson
garyhodgson / skeinlog.groovy
Created April 12, 2011 21:44
A small script that extracts skeinforge settings from a profile folder and prints out a html report
#!/usr/bin/env groovy
import groovy.xml.MarkupBuilder
// 1st param is profile directory, or use default given below
def settingsPath = (this.args.length > 0)? this.args[0] : "C:\\Users\\Gary Hodgson\\Desktop\\skeinforge settings\\profiles\\extrusion\\Mendeln05l04PLA"
list= []
new File(settingsPath).eachFileRecurse{ list<< it }
@garyhodgson
garyhodgson / reprap-wiki-analysis.groovy
Created May 17, 2011 23:07
Parses a mediawiki export and generates an analysis of content for RepRap Wiki
#!/usr/bin/env groovy
import groovy.time.*
// Export File from http://reprap.org/wiki/Special:Export, using category: "Development"
def f2= new File('RepRapWiki-DevelopmentPages_LatestRevisions.xml')
def records = new XmlSlurper().parseText(f2.getText())
def pages = records.page
@garyhodgson
garyhodgson / gist:1002708
Created June 1, 2011 16:35
textile testbed

development-tracker.info:25

Title textile testbed
Description Testing the github parser
Status New