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
# Sources: | |
# https://www.raspberrypi.org/forums/viewtopic.php?t=144374 | |
# https://github.com/ev3dev/ev3dev/issues/198 | |
# https://askubuntu.com/questions/71863/how-to-change-pulseaudio-sink-with-pacmd-set-default-sink-during-playback | |
# Remember to reboot | |
# CHANGE THESE | |
VOLUME_TRIGGER = 45 # Relative Decibels. Bigger number = louder | |
PROPORTION_TRIGGER = 0.5 # Should be between 0 (any peak, however short) and 1 (only continuous sound) | |
LENGTH_OF_SAMPLE = 5 # The period to look at in second |
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 | |
/* | |
WMUK block copier © 2011 and 2013 Harry Burt <jarry1250@gmail.com> | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
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
var url = 'http://www.foo.com/bar.jsonp?callback=cb'; | |
$.ajax({ | |
url: url, | |
jsonpCallback: 'cb', | |
dataType: 'jsonp', | |
success: function( data ) { | |
console.log( 'Success A' ); | |
} | |
}); | |
$.getJSON(url, null, function (data) { |
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_once( '../mw-peachy/Init.php' ); | |
set_time_limit( 0 ); | |
$site = Peachy::newWiki( 'livingbot' ); | |
$template = 'EH listed building row'; | |
$mysqli = new mysqli( "localhost", 'root' ); | |
/* check connection */ | |
if ( mysqli_connect_errno() ) { | |
printf( "Connect failed: %s\n", mysqli_connect_error() ); |
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_once( '../mw-peachy/Init.php' ); | |
set_time_limit( 0 ); | |
$site = Peachy::newWiki( 'livingbot' ); | |
$commons = Peachy::newWiki( null, null, null, 'https://commons.wikimedia.org/w/api.php' ); | |
$http = new HTTP(); | |
$template = '{{EH listed building row'; | |
$lists = array( 'Grade I listed buildings in Suffolk Coastal' /* etc */ ); | |
foreach( $lists as $list ){ |