Skip to content

Instantly share code, notes, and snippets.

View polishdeveloper's full-sized avatar

Piotr Miazga polishdeveloper

View GitHub Profile
diff --git a/includes/BookRenderingMediator.php b/includes/BookRenderingMediator.php
index 9d30550..400aec7 100644
--- a/includes/BookRenderingMediator.php
+++ b/includes/BookRenderingMediator.php
@@ -192,10 +192,7 @@ class BookRenderingMediator implements LoggerAwareInterface {
'electron' => ElectronVirtualRestService::class,
];
foreach ( $modules as $module => $class ) {
- if ( !isset( $config['modules'][$module] ) ) {
- throw new Exception( "VirtualRESTService module $module is not configured propely" );
anonymous
anonymous / listen-to-wikipedia.sh
Created March 31, 2017 21:04
Listen to wikipedia
curl -s "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&generator=random&redirects=1&exsentences=2&exlimit=1&explaintext=1&exsectionformat=plain&grnnamespace=0&grnfilterredir=nonredirects&formatversion=2" | python -c 'import sys, json; resp = json.load(sys.stdin); print unicode(resp["query"]["pages"][0]["title"] + ". " + resp["query"]["pages"][0]["extract"]).encode("utf-8")'| say