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 | |
function foo() { return true; } | |
function bar() { return true; } | |
function baz() { return false; } | |
function bat() { return true; } | |
function lorem() { return true; } | |
function ipsum() { return true; } | |
function dolor() { return false; } | |
function sit() { return false; } | |
function amet() { return true; } |
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 | |
/** | |
* Optimized strtotime function. | |
* For turning 24hr time in the form HH:MM:SS into its equivalent | |
* epoch time. | |
* | |
* Returns the same result as strtotime but instead of 0m29.337s | |
* for 1 million records it only takes 0m15.243s or a whopping | |
* 192% performance boost. | |
* |
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
$ ./exampleProgram/exampleProgram all simmetrics symmetrics | |
Block Distance between simmetrics & symmetrics is 1 and yields a 50% similarity | |
Cosine Similarity between simmetrics & symmetrics is not applicable and yields a 0% similarity | |
Dice Similarity between simmetrics & symmetrics is not applicable and yields a 0% similarity | |
Euclidean Distance between simmetrics & symmetrics is 1.41 and yields a 29% similarity | |
Jaccard Similarity between simmetrics & symmetrics is not applicable and yields a 0% similarity | |
Jaro Similarity between simmetrics & symmetrics is not applicable and yields a 87% similarity | |
Jaro Winkler Similarity between simmetrics & symmetrics is not applicable and yields a 88% similarity | |
Levenshtein Distance between simmetrics & symmetrics is 1 a |
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
$ make phantomjs-inject | |
Respect/Foundation: 0.1.13 | |
Usage: make phantomjs-snapshot url=<site-url> [code=jQuery Script] or use stdin | |
Example: | |
As command line argument: | |
make phantomjs-inject url=respect.li code='alert($$("title").text());' | |
note: requires dollar escaped as double dollar $$ | |
From stdin: |
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 | |
function make_php_ini() { | |
continue_after 5 "Config ini" && return | |
if [[ -n "$DEFAULT_INI" ]]; then | |
if [[ -f "$PREFIX/$DEFAULT_INI" ]]; then | |
cp "$PREFIX/$DEFAULT_INI" "$PREFIX/etc/php.ini" | |
else | |
if [[ -f "$DEFAULT_INI" ]]; then |
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
$ echo '$("a").each(function () { | |
alert($(this).text()); | |
});'|make phantomjs-inject url=google.co.za | |
Respect/Foundation: 0.1.12 | |
http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js | |
+You | |
Search | |
Images | |
Maps |
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
{ | |
"extends":"http://json-schema.org/hyper-schema", | |
"description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", | |
"properties":{ | |
"methods":{ | |
"type":"object", | |
"description":"This defines the set of methods available to the class instances", | |
"additionalProperties":{ | |
"type":"object", | |
"description":"The definition of the method", |
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
{ | |
"$schema": "http://json-schema.org/draft-03/hyper-schema#", | |
"id": "http://json-schema.org/draft-03/json-ref#", | |
"additionalItems": { "$ref": "#" }, | |
"additionalProperties": { "$ref": "#" }, | |
"links": [ | |
{ | |
"href": "{id}", | |
"rel": "self" | |
}, |
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
{ | |
"$schema": "http://json-schema.org/draft-03/hyper-schema#", | |
"id": "http://json-schema.org/draft-03/links#", | |
"type": "object", | |
"properties": { | |
"href": { | |
"type": "string", | |
"required": true | |
}, |
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
{ | |
"$schema": "http://json-schema.org/draft-03/hyper-schema#", | |
"id": "http://json-schema.org/draft-03/hyper-schema#", | |
"extends": { "$ref": "http://json-schema.org/draft-03/schema#" }, | |
"properties": { | |
"links": { | |
"type": "array", | |
"items": { "$ref": "http://json-schema.org/draft-03/links#" } | |
}, | |
"fragmentResolution": { |