Skip to content

Instantly share code, notes, and snippets.

@leoh
leoh / schema.xml
Last active December 9, 2016 12:32
config for uuid field in solr 4.6
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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
@leoh
leoh / solrconfig_HighlightComponent.xml
Created February 15, 2014 22:36
solr.HighlightComponent example
<!-- Highlighting Component
http://wiki.apache.org/solr/HighlightingParameters
-->
<searchComponent class="solr.HighlightComponent" name="highlight">
<highlighting>
<!-- Configure the standard fragmenter -->
<!-- This could most likely be commented out in the "default" case -->
<fragmenter name="gap"
default="true"
{ "path": "/content/geometrixx/my-first-jinja-page",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:Page" }],
"nodes": [
{ "path": "jcr:content",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:PageContent"},
@leoh
leoh / list.txt
Created March 27, 2014 17:51
filelist
"currency.xml"
"index_synonyms.txt"
"lang/contractions_ca.txt"
"lang/contractions_fr.txt"
"lang/contractions_ga.txt"
"lang/contractions_it.txt"
"lang/hyphenations_ga.txt"
"lang/stemdict_nl.txt"
"lang/stoptags_ja.txt"
"lang/stopwords_ar.txt"
@leoh
leoh / restify-facebook.js
Created April 2, 2014 19:16 — forked from jaredhanson/gist:2559730
restify-passport-facebook.js
// Based off example code from Hal Robertson
// https://github.com/halrobertson/test-restify-passport-facebook
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao
var restify = require('restify')
// config vars
var FB_LOGIN_PATH = '/api/facebook_login'
var FB_CALLBACK_PATH = '/api/facebook_callback'
var FB_APPID = '<<YOUR APPID HERE>>'
@leoh
leoh / app.js
Last active August 29, 2015 14:06 — forked from jmibanez/gist:2140974
A complete example of using restify with connect
// Restify server config here
var restify = require('restify');
var server = restify.createServer({
name: 'restify-test',
version: '1.0.0'
});
function respond(req, res, next) {
res.send('hello ' + req.params.name);
next();
@leoh
leoh / README.md
Last active August 29, 2015 14:11 — forked from mbostock/.block

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

@leoh
leoh / atad.csv
Last active August 29, 2015 14:11 — forked from d3noob/.block
date close
26-Mar-12 606.98
27-Mar-12 614.48
28-Mar-12 617.62
29-Mar-12 609.86
30-Mar-12 599.55
2-Apr-12 618.63
3-Apr-12 629.32
4-Apr-12 624.31
5-Apr-12 633.68
@leoh
leoh / README.md
Last active August 29, 2015 14:11 — forked from ericcoopey/README.md

Word cloud implementation.

Example of how to

  1. Change style from default. Uses linear scale

  2. Alter word size

  3. "Fit" it into the screen. At first the words were appearing out of view to the left.

ELECTRIC SKILLET TEMPERATURE–TIMETABLE
Food: degrees (approximate cooking time in minutes)
FRYING
Bacon: 300 to 325 (8-10 minutes)
Canadian Bacon: 275 to 300 (3-4 minutes)
Chicken: 325 to 350 (25-40 minutes)
Eggs, Fried: 250 to 275 (3-5 minutes)
Eggs, Scrambled: 250 to 275 (3-5 minutes)
Fish: 325 to 375 (5-10 minutes)