Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am Wol on github.
  • I am yerwol (https://keybase.io/yerwol) on keybase.
  • I have a public key whose fingerprint is D910 0358 2438 3E7E BAF3 E2EB 41CF 7859 24A4 1D35

To claim this, I am signing this object:

#!/usr/bin/env php
<?php
function stdin_stream()
{
while ($line = fgets(STDIN)) {
yield $line;
}
}
$columnsizes = [];
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDTqG/5RZC/OC4a/vZ0YDG4zhtQeQYNdzc2weONydgNJiJjO9Mo1DVx+VeNy7WO5uTbQew5N69HoxIizk0qsJMWiuubL/Bhr4BMcpxsSpwgNvsTmkqbVodnYZffGBKfGkXPyp3PojRGpPmqY+KiwoO5ilVQSY0Et3wGo7dCn7Fz4IThuOdRB195H9mGed8ajrJcidlNhdMWP3MWs4+aLMxzQHJQ8RyKx0XpELFNXVyEjX7Kv2DUP5BSaFnEgfF8hOr45594twQVkarLLxgYDK4KgQ56d/7bphqT4O05daTuky7vcEml+rALJTk3UFzjg2LG0BFac49YXiuPXBszfu04COVjGXnqPdn4GWrqTwCEnIlccVv4axA+nUEyVJtHDajGZg/kSDbSjqNomTi2HQYgBZiX2pDpEvTyjTKm+1fk3PPs4WzFJLjIkeg31HuaJmOWdsOFgUryCaLx/1gp7+ZKXadUM1OnanClUXaMUSmcQV2WtVAjJ26MHtd7etougDsLappUJl1rsmVMElfb+p3hFY5HZVmPiXrqZfHXZ5jiodMhW6lEtv4C0L0lsYiNPqX1QEkSKjOIps6qrT/Dc2SA/2pq9HTaHvMXGlT22YWBrGBVb7GeMfOkerO1W6iqJUWQLqI2SIObmjNMxUvOXp6px7w3KrviEeicnSBb8XTpkQ==
Electronic info for Hozelock Sensor Controller and Controller plus
With the controller faceplate detatched, looking at the two RCA connections on the valve, the left hand valve is the feedback switch, and then right hand connector is the motor drive
The 'shield' on both is actually joined together within the valve. This is linked to +ve (3.3v), to make sure the motor drives the correct way. The center pin on the switch connector is an open circuit when the valve is open, and a closed circuit when the valve is closed. It changes just after it gets past the 90 degree point.
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAtaBU/TWY3EGnWCBk7JFo3+PylK0X0C4iBAia596f71c4Xkq8NkeHvf+VG27XdXWhm0Qei1+uB0cvEwv0q4nY/5Ceu2q2+8HP8m5rla3t8C98d/pfFzFPTwY747/2rOwWGjAA+qnSGN0zJwmbs2/EJifyVLZ0WuixmNQEhTNSvmk=
Go to: http://www.madeon.fr/adventuremachine/
setInterval(function(){var g = angular.element('epic-lols').scope().game; g.clickButton(g.buttons[Math.floor(Math.random() * 36)]); }, 3000);
Copy the above into console.
All credits to yerwol (https://github.com/wol)
@Wol
Wol / pyrocms_migration.php
Created May 17, 2016 08:23
Add a field to a Stream in PyroCMS 3
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
class MyprojectModuleIndividualsAddSlugField extends Migration
{
/* Define the new field, and field config here */
protected $fields = [
'slug' => [
'type' => 'anomaly.field_type.slug',
@Wol
Wol / twitter.php
Last active August 16, 2016 22:55
Twitter Analytics PHP Downloader
<?php
$sTarget = "https://analytics.twitter.com/user/$username/tweets/export.json?start_time=$start_time&end_time=$end_time&lang=en";
$sTargetBundle = "https://analytics.twitter.com/user/$username/tweets/bundle?start_time=$start_time&end_time=$end_time&lang=en";
curl_setopt($ch, CURLOPT_URL, $sTarget);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);
@Wol
Wol / b2tob3.md
Last active April 15, 2016 15:36 — forked from RyanThompson/b2tob3.md
Migrating Beta2 to Beta3
  • First install a clean copy of PyroCMS Beta3 for reference.
  • Next update the composer.json file of your B2 install with that of the B3 install.
  • Mark your B2 install as INSTALLED=false.
  • composer update to bring in all the new goodies.
  • Add placeholder, warning, instructions to streams_fields_translations table.
  • Mark all streams in streams_streams as trashable=1 according to fresh install's table.
  • Add deleted_at (DATETIME) to all stream entry tables where the stream is marked trashable above.
  • Rename the stream groups to menus in streams_streams.
  • Rename the table navigation_groups to navigation_menus.
  • Rename the column group_id to menu_id in navigation_links.
@Wol
Wol / drupalreleasecheck.sh
Created March 14, 2016 11:20
Drupal release check script
#!/bin/bash
echo "Checking modules"
cat modulelist.txt | while read m
do
# echo -ne "${m}\t"