This file contains 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 php | |
<?php | |
require dirname(__FILE__) . '/../phpresolver/playdarresolver.php'; | |
class AmpacheResolver extends PlaydarResolver { | |
protected $name = 'ampache resolver'; | |
protected $targetTime = 50; | |
protected $weight = 100; | |
protected $localonly = FALSE; |
This file contains 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
<?php | |
// http://www.elasticsearch.com/docs/elasticsearch/rest_api/ | |
class ElasticSearch { | |
public $index; | |
function __construct($server = 'http://localhost:9200'){ | |
$this->server = $server; | |
} |
This file contains 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
<?php | |
require 'ElasticSearch.php'; | |
$e = new ElasticSearch; | |
$e->index = 'tfl'; // name of the index | |
/* run this section once to fetch and index the data */ | |
$e->create(); // create the index |
This file contains 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
#!/bin/bash | |
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again | |
EMAIL='YOUR_EMAIL' # edit this | |
PASS='YOUR_PASSWORD' # edit this | |
COOKIES='cookies.txt' | |
USER_AGENT='Firefox/3.5' |
This file contains 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
<?php | |
$pid = 'b00qx16f'; // example | |
$dom = @DOMDocument::loadHTMLFile('http://www.bbc.co.uk/programmes/' . $pid); | |
$xpath = new DOMXpath($dom); | |
$items = array(); | |
$nodes = $xpath->query("//*[@typeof='mo:Track']"); | |
foreach ($nodes as $node) |
This file contains 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
# in web browser | |
# http://uec-images.ubuntu.com/releases/karmic/release/ | |
# canonical karmic 64-bit AMI: | |
# ami-55739e3c | |
# canonical karmic 32-bit AMI: | |
# ami-bb709dd2 | |
# https://console.aws.amazon.com/ec2/home#c=EC2&s=Instances | |
# Launch Instance > Community AMIs |
This file contains 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
<Context docBase="/solr/solr.war" debug="0" crossContext="true"> | |
<Environment name="solr/home" type="java.lang.String" value="/solr/wikipedia" override="true" /> | |
</Context> |
This file contains 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 version="1.0" encoding="UTF-8"?> | |
<config> | |
<indexDefaults> | |
<useCompoundFile>false</useCompoundFile> | |
<mergeFactor>10</mergeFactor> | |
<ramBufferSizeMB>256</ramBufferSizeMB> | |
<maxFieldLength>100000000</maxFieldLength> | |
<writeLockTimeout>1000</writeLockTimeout> | |
<commitLockTimeout>10000</commitLockTimeout> | |
<lockType>native</lockType> |
This file contains 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 version="1.0" encoding="UTF-8" ?> | |
<schema name="wikipedia" version="1.2"> | |
<types> | |
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> | |
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/> |
This file contains 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 version="1.0"?> | |
<description xmlns="http://www.w3.org/ns/wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2007/06/wsdl/wsdl20.xsd http://www.w3.org/2007/06/wsdl/wsdl20.xsd" xmlns:eutils="http://www.ncbi.nlm.nih.gov/eutils" targetNamespace="http://www.ncbi.nlm.nih.gov/eutils"> | |
<service name="eFetchService" interface="eutils:eFetchInterface"> | |
<endpoint name="eFetchEndpoint" binding="eutils:eFetchBindingHTTP" address="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi"/> | |
</service> | |
<binding name="eFetchBindingHTTP" interface="eutils:eFetchInterface" type="http://www.w3.org/ns/wsdl/http" xmlns:whttp="http://www.w3.org/ns/wsdl/http" whttp:methodDefault="GET"> | |
<operation ref="eutils:eFetch"/> | |
</binding> |