Skip to content

Instantly share code, notes, and snippets.

View FabioBatSilva's full-sized avatar

Fabio Silva FabioBatSilva

View GitHub Profile
@FabioBatSilva
FabioBatSilva / doctrine-mapping.xsd
Created February 2, 2012 23:51
doctrine-mapping.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:orm="http://doctrine-project.org/schemas/orm/doctrine-mapping"
elementFormDefault="qualified">
<xs:annotation>
<xs:documentation><![CDATA[
This is the XML Schema for the object/relational
@FabioBatSilva
FabioBatSilva / DirectionEnum.php
Created August 6, 2012 15:49
Type-safe enumeration class.
<?php
class DirectionEnum extends Enum
{
const NORTH = 'NORTH';
const SOUTH = 'SOUTH';
const EAST = 'EAST';
const WEST = 'WEST';
/**
* @return boolean
@FabioBatSilva
FabioBatSilva / doctrine-phpunit.xhprof.xml
Created March 15, 2013 20:20
doctrine-phpunit.xml.xhprof
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use this configuration file as a template to run the tests against any dbms.
Procedure:
1) Save a copy of this file with a name of your chosing. It doesn't matter
where you place it as long as you know where it is.
i.e. "mysqlconf.xml" (It needs the ending .xml).
2) Edit the file and fill in your settings (database name, type, username, etc.)
Just change the "value"s, not the names of the var elements.
3) To run the tests against the database type the following from within the
[user]
name = username
email = email@email.com
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
@FabioBatSilva
FabioBatSilva / join-pdf.sh
Created March 26, 2013 01:25
join pdf files
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=all.pdf *.pdf
@FabioBatSilva
FabioBatSilva / carte-start-three-cluster-nodes.sh
Created June 3, 2013 18:36
Exercise 18: Clustering and Partitioning Example for starting carte with 3 instances on port 8081, 8082, 8083.
#!/bin/sh
### ====================================================================== ###
## ##
## Pentaho Start Script ##
## Example for starting carte with 3 instances on port 8081, 8082, 8083. ##
## ##
### ====================================================================== ###
cd "/Applications/pentaho/design-tools/data-integration"
@FabioBatSilva
FabioBatSilva / account.json
Last active August 29, 2015 14:08
Query flat data when indexing a document with conceptually many 'children':
{
"id": 1,
"username": "Box2Account",
"profiles": [
{
"id": "24029",
"gender": "1",
"birthday": "1982-05-03T04:00:00Z"
},
{

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
// CREATE COLLECTION
solr create_collection -c my_collection -shards 2 -d path-to-my-conf
// CHECK COLLECTION SCHEMA
curl http://solr-host.dev:8983/solr/my_collection/schema?wt=schema.xml
// SCHEMA ITS GOOD
// UPDATE SCHEMA
curl 'http://192.168.56.101:8983/solr/my_collection/select?wt=json&fl=id&fq=index_type:foobar&group=true&group.field=year_make_model&group.facet=true&facet=true&facet.field=year'
ull:org.apache.solr.common.SolrException: Exception during facet.field: year
at org.apache.solr.request.SimpleFacets$3.call(SimpleFacets.java:627)
at org.apache.solr.request.SimpleFacets$3.call(SimpleFacets.java:612)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.apache.solr.request.SimpleFacets$2.execute(SimpleFacets.java:566)
at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:637)
at org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:280)
at org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:106)