Skip to content

Instantly share code, notes, and snippets.

View danlentz's full-sized avatar

Dan Lentz danlentz

View GitHub Profile
@danlentz
danlentz / gist:986846
Created May 23, 2011 15:07 — forked from pyropeter/gist:506166
Google Search API documentation
# http://www.google.com/uds/GwebSearch?q=foo%20bar&v=1.0
{ responseStatus: 200
, responseData:
{ results:
[ { visibleUrl: 'www.foobar2000.org'
, titleNoFormatting: 'foobar2000'
, cacheUrl: 'http://www.google.com/search?q=cache:obAJTkESjhwJ:www.foobar2000.org'
, title: 'foobar2000'
, content: 'Media player with simple UI and low memory use. Offers plugin support for new features. Includes link to forum focused on application. [Win32]'
@danlentz
danlentz / google_ajax_search.rb
Created May 23, 2011 15:08 — forked from marshluca/google_ajax_search.rb
Google Ajax Search API
require 'rubygems'
require 'json'
require 'hpricot'
require 'open-uri'
def google_search(service,query,page,options=nil)
url = "http://ajax.googleapis.com/ajax/services/search/#{service}?v=1.0&q=#{query}&start=#{page}0"
url += options.to_s
url += "&key=ABQIAAAAvJK0-O6R9IuRS5y6YePa_BQ7FXN5Ck7MXp2rPPrMwF-0TtPdBhSCDq3eiNkPUQlaeTXgVbm7vRuvyw"
I've just put up a large chunk of my Twitter archives up on the
Talis Platform service. Talis Platform is a 'cloud'-based
triplestore hosting service. More at http://n2.talis.com
A triplestore is like a database but for graphs of RDF triples.
The cool thing about RDF and the triplestore is that you
basically have a completely schema-less datastore. You don't have
to figure out "Oh, there's integers going in this field and
strings going in that". You just upload a big pile of RDF and the
triplestore keeps it all there. This is obviously not as efficient
as using a database, so if you want to grow to Google size, it may
@danlentz
danlentz / rdfa-load
Created May 24, 2011 03:05 — forked from njh/rdfa-load
Example of parsing RDFa into a graph
#!/usr/bin/env ruby
require 'rubygems'
require 'rdf/rdfa'
graph = RDF::Graph.load('http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/0001.xhtml', :base_uri => 'http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/0001.xhtml')
graph.each_statement do |statement|
statement.inspect!
end
@danlentz
danlentz / gist:1002215
Created June 1, 2011 12:42 — forked from philogb/gist:979085
ext.js example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stack Simulator</title>
<link rel="stylesheet" type="text/css" href="../../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../../bootstrap.js"></script>
<script>
Ext.require(['Ext.chart.*', 'Ext.data.*']);
@danlentz
danlentz / syms.lisp
Created September 27, 2011 15:12
getting node representation "right"
;; ===============================================================================================
;; getting representation "right"
;; ------------------------------------------------------------
;;
;; does not mandate but fully retains dr andersons package-as-namespace philosophy
;; (PACKAGE-NAME *PACKAGE*) => "https://github.com/danlentz/vivace-graph-v2/"
;; (CONTEXT (PACKAGE-NAME *PACKAGE*)) => _:|urn:uuid:be19cc91-f46d-5b63-84d9-e487fb06a334|
;; *PACKAGE* => #<PACKAGE "https://github.com/danlentz/vivace-graph-v2/">
;;
;; dynamic context; defaults to v5uuid of current package
@danlentz
danlentz / qdiff.lisp
Created September 28, 2011 01:24 — forked from hanshuebner/qdiff.lisp
Diff checked-out quicklisp project against dist version
;;;; qdiff.lisp
(defpackage #:qdiff
(:use #:cl)
(:shadowing-import-from #:ql-dist
#:name
#:release
#:ensure-local-archive-file
#:base-directory
#:prefix)
@danlentz
danlentz / overview.lisp
Created September 10, 2012 18:51 — forked from jaeschliman/overview.lisp
overview of the protocol, sequence, iterator, and iterate+ packages.
#|
A working overview of the protocol, sequence,
iterator, and iterate+ packages.
These packages are each quite small and are
intended to be used ala carte.
the projects are all here on github:
https://github.com/jaeschliman/
@danlentz
danlentz / iterate.org
Created October 4, 2012 06:12
Iterate Clauses

Iterate Reference

ClauseOptionsDesc
INITIALLYLisp forms to execute before loop starts
AFTER-EACHLisp
@danlentz
danlentz / bluezenburn-theme.el
Created November 1, 2012 05:26
bluezenburn.el
;;; bluezenburn-theme.el --- A low contrast color theme for Emacs.
;; Copyright (C) 2011 Bozhidar Batsov
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://github.com/bbatsov/bluezenburn-emacs
;; Version: 1.7
;; 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