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
(use 'clojure.contrib.seq-utils) | |
(def graph {:a [:b], :b [:a :c], :c [:b :d], :d [:c]}) | |
(defn find-path | |
"Find a path between a start and an end node." | |
([g start end] | |
(if (contains? g start) | |
(find-path g start end []))) | |
([g start end path] |
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
(use '(clojure.contrib str-utils seq-utils duck-streams server-socket)) | |
(def *connections* (ref [])) | |
(defn- ire-handle-client [in out] | |
(binding [*in* (reader in) | |
*out* (writer out)] | |
(dosync (commute *connections* conj *out*)) | |
(loop [input (read-line)] | |
(when input |
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
(use '(clojure.contrib str-utils seq-utils duck-streams server-socket)) | |
(use '(clojure.contrib stacktrace)) | |
(declare *name*) | |
(def *users* (ref {})) | |
(def *channels* (ref {})) |
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
creating /usr/lib/python2.5/site-packages/sqlalchemy | |
error: could not create '/usr/lib/python2.5/site-packages/sqlalchemy': Permission denied | |
---------------------------------------- | |
Command /usr/bin/python2.5 -c "import setuptools; __file__='/home/jb/code/build/sqlalchemy/setup.py'; execfile('/home/jb/code/build/sqlalchemy/setup.py')" install --single-version-externally-managed --record /tmp/pip-2Ae0kE-record/install-record.txt --install-headers /home/jb/code/lib/include failed with error code 1 | |
Exception information: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.5/site-packages/pip-0.4-py2.5.egg/pip.py", line 274, in main | |
self.run(options, args) |
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
>> require "watir-webdriver" | |
=> true | |
>> browser = Watir::Browser.new :firefox=> #<Watir::Browser:0x7fc6350c1f90 url="about:blank" title=""> | |
>> browser.goto "file:///tmp/testcase.html" | |
=> "file:///tmp/testcase.html" | |
>> browser.divs | |
=> #<Watir::DivCollection:0x7fc6351366b0 @parent=#<Watir::Browser:0x7fc6350c1f90 url="file:///tmp/testcase.html" title="">, selector{:tag_name=>"div"} | |
>> browser.divs.length | |
=> 6 | |
>> browser.divs(:class, "a") |
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
@announce @announce-all | |
Feature: Configure the dashboard | |
As a Jimdo employee | |
I want to configure my dashboard | |
so that I have all data relevant to me visible in one place | |
Scenario: Configure config.json | |
Given a "config.json" file with: | |
""" | |
[{"title":"Example", "url":"http://example.com"}, |
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
#!/usr/bin/env python | |
from __future__ import with_statement | |
import os | |
import re | |
import shutil | |
import subprocess | |
import sys | |
import tempfile | |
import shlex |
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
var.projectdir = env.HOME + "/projects/transifex/transifex" | |
var.basedir = env.HOME + "/projects/transifex/lighttpd" | |
server.modules = ( | |
"mod_access", | |
"mod_alias", | |
"mod_accesslog", | |
"mod_extforward", | |
"mod_rewrite", | |
"mod_fastcgi", |
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
t | |
twitter][tweet][123], source[]}] | |
org.elasticsearch.ElasticSearchParseException: Failed to derive xcontent from (offset=0, length=1): [-128] | |
at org.elasticsearch.common.xcontent.XContentFactory.xContent(XContentFactory.java:147) | |
at org.elasticsearch.common.xcontent.XContentHelper.createParser(XContentHelper.java:49) | |
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:428) | |
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:414) | |
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:302) |
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
# [Mon Jan 16 11:23:14 2012] Protocol: http, Server: 192.168.5.10:9200 | |
curl -XPUT 'http://127.0.0.1:9200/users/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"info" : { | |
"_all" : { | |
"type" : "string", | |
"analyzer" : "uax_url_email" | |
}, | |
"properties" : { |
OlderNewer