Skip to content

Instantly share code, notes, and snippets.

View johnabela's full-sized avatar
🏠
Working from home

John Abela johnabela

🏠
Working from home
View GitHub Profile
@amoilanen
amoilanen / speech_apis_demo.js
Last active October 6, 2016 07:17
Demo of the JavaScript speech API, can be pasted and executed in the browser console in Google Chrome
//Based on the demo https://gist.github.com/wesbos/cd16b8b1815825f111a2
(function(host) {
if (typeof speechSynthesis === 'undefined') {
console.warn('No speech syntesis feature available,'
+ 'calls to "say" will be ignored, try latest Google Chrome');
host.say = function() {};
return;
}
@xeoncross
xeoncross / kjv_words.txt
Created February 23, 2016 19:33
Every word and symbol used in the 1611 KJV version of the bible along with its use count.
, 70683
the 63919
and 51696
of 34618
. 26145
to 13560
that 12915
: 12721
in 12667
he 10420
@xeoncross
xeoncross / madness.php
Last active June 15, 2018 09:55
One of the great things about PHP is you don't have the follow the rules when hacking stuff together. This makes map-building work easy to type up. However, since Golang there isn't much reason to use PHP anymore. Golang exceeds in every area from the stdlib to the speed and security of the application.
<?php
// Type casting is easy on weak languages
$a = (object) (array) (object) (array) (object) ["foo" => "bar"];
// PHP will happily iterate over an object (like Javascript)
foreach($a as $key => $value) {
print "$key = $value" . PHP_EOL;
}