This file contains hidden or 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
curl -H "Content-Type: application/json" --data-ascii '{ "_pretty":true, "_show_stats":true, "_timeout":1.9, "url_base":"http://api.infochimps.com/social/network/tw/influence/trstrank.json?_apikey='$APIKEY'&user_id=", "url_vals":"'`cat /tmp/strong_links_ids.txt`'" }' -v 'http://localhost:9004/batch.json' | |
* About to connect() to localhost port 9004 (#0) | |
* Trying ::1... Connection refused | |
* Trying fe80::1... Connection refused | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 9004 (#0) | |
> POST /batch.json HTTP/1.1 | |
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3 | |
> Host: localhost:9004 | |
> Accept: */* |
This file contains hidden or 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
clientID = '' | |
clientSecret = '' | |
redirectURI = 'urn:ietf:wg:oauth:2.0:oob' | |
code = '' | |
https = require 'https' | |
http = require 'http' | |
querystring = require 'querystring' | |
getRefreshToken = -> |
This file contains hidden or 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
<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.*']); | |
This file contains hidden or 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
(defclass cons-presentation-mixin () | |
((car-type :accessor cons-presentation-car-type | |
:initarg :car-type) | |
(cdr-type :accessor cons-presentation-cdr-type | |
:initarg :cdr-type)) | |
(:documentation "A presentation for conses.")) | |
(defclass cons-presentation (presentation cons-presentation-mixin) | |
() | |
) |
This file contains hidden or 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
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 |
This file contains hidden or 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
;;; XML parsing and clojure.zip | |
;;; There's got to be a cleaner way to do this. | |
;;; I have code like this: | |
(defn jdks-loc [xml-zipper] | |
(zip/down | |
(first | |
(filter #(let [n (zip/node %)] |
This file contains hidden or 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
cd path/to/git/repo | |
git remote add github [email protected]:${user_or_org}/${repo}.git | |
git remote rename origin old | |
for b in `git branch -r --no-color | cut -b3- | grep --color=none '^old/' | grep -v '/HEAD ' | cut -d '/' -f2` | |
do | |
git push github old/$b:refs/heads/$b | |
done |
This file contains hidden or 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
(ns test-clj-byte-chunk-seq | |
(:import (java.io InputStream OutputStream | |
FileInputStream FileOutputStream))) | |
(set! *warn-on-reflection* true) | |
(def ^:const ONE_MEG (* 1024 1024)) | |
(deftype ByteArrayChunk [^bytes array ^int offset ^int end] | |
clojure.lang.IChunk |
This file contains hidden or 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
(with-unlocked-packages (:sb-alien) | |
(let ((function (symbol-function 'sb-alien::try-reopen-shared-object))) | |
(setf (symbol-function 'sb-alien::try-reopen-shared-object) | |
#'(lambda (obj) | |
"Look at the pathname of the library we are trying to re-open | |
and only use the full absolute path if the named file exists. Otherwise reduce the | |
path to the minimal relative form and defer the search to the OS dynamic linker." | |
(declare (type sb-alien::shared-object obj)) | |
(let ((path (sb-alien::shared-object-pathname obj))) | |
(when (pathname-directory path) |