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 | |
public function lineByLineImproved($anagramSeed) { | |
$fileinfo = new \SplFileInfo(RESOURCE.'wordlist.txt'); | |
$file = $fileinfo->openFile('r'); | |
$matchedWords = array(); | |
$anagramSeedLength = strlen($anagramSeed); //do this once |
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 | |
public function preloadArray($anagramSeed) { | |
$fileinfo = new \SplFileInfo(RESOURCE.'wordlist.txt'); | |
$file = $fileinfo->openFile('r'); | |
$anagramSeedLength = strlen($anagramSeed); | |
$anagramSeedAsArray = str_split($anagramSeed); | |
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"?> | |
<project name="${projectName}" basedir="." default="build:main"> | |
<!-- Properties --> | |
<property name="dir.app" value="${project.basedir}/app" /> | |
<property name="dir.src" value="${project.basedir}/src" /> | |
<property name="dir.build" value="${project.basedir}/app/build" /> | |
<property name="dir.docs" value="${dir.build}/docs" /> | |
<property name="dir.docs.phpdoc" value="${dir.docs}/phpdoc" /> | |
<property name="dir.docs.docblox" value="${dir.docs}/docblox" /> | |
<property name="dir.reports" value="${dir.build}/logs" /> |
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 | |
/** | |
* Map CSV columns to fields | |
* | |
* somefile.csv content = "some guy, 5 Road Street, Town, Postcode" | |
* | |
* $mapper = new CsvMapper('/tmp/somefile.csv'); | |
* $mapper->mapField('A', 'name')->filter('name', function($value){ return ucwords($value); }); | |
* $mapper->mapAggregateField(array('B', C', D'), 'address', ', '); | |
* $mapper->mapLiteral('source', 'unknown'); |
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 | |
# Current time in milliseconds | |
metric=load_value_test | |
host=127.0.0.1 | |
for i in {1..10000} | |
do | |
now=$(($(date +%s%N)/1000000)) | |
echo "put $metric $now $i name=A" | nc -w 30 $host 4242 |
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
confConsLevel.setDefaultReadConsistencyLevel(HConsistencyLevel.ONE); | |
confConsLevel.setDefaultWriteConsistencyLevel(HConsistencyLevel.ANY); |
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 | |
# Current time in milliseconds | |
metric=test_rest_metric | |
host=127.0.0.1:8080 | |
for i in {1..10000} | |
do | |
now=$(($(date +%s%N)/1000000)) | |
curl -X POST -H "Content-Type: application/json" -d "[{"name": "$metric", "datapoints": [[$now, $i]], "tags": {"hostname": 'foo'}}]" $host/api/v1/datapoints |
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/python | |
import sys, re | |
# To use run | |
# | |
# $ nodetool status | ./ntcolour.py | |
# | |
# or to refresh forever use: | |
# |
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
{ | |
"title": "Overview", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "*", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0, |
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
# Doxyfile 1.7.6.1 | |
# This file describes the settings to be used by the documentation system | |
# doxygen (www.doxygen.org) for a project. | |
# | |
# All text after a hash (#) is considered a comment and will be ignored. | |
# The format is: | |
# TAG = value [value, ...] | |
# For lists items can also be appended using: | |
# TAG += value [value, ...] |
OlderNewer