Coding

ESP8266 Countdown Timer

#include <ESP8266WiFi.h> #include <WiFiUdp.h> #include “HCMAX7219.h” #include “SPI.h” #define SECS_PER_MIN (60UL) #define SECS_PER_HOUR (3600UL) #define SECS_PER_DAY (SECS_PER_HOUR * 24L) #define numberOfSeconds(_time_) (_time_ % SECS_PER_MIN) #define numberOfMinutes(_time_) ((_time_ / SECS_PER_MIN) % SECS_PER_MIN) #define numberOfHours(_time_) (( _time_% SECS_PER_DAY) / SECS_PER_HOUR) #define elapsedDays(_time_) ( _time_ / SECS_PER_DAY) #define NUMBEROFDRIVERS 1 //We always have to include the library #include “LedControl.h” LedControl lc = LedControl(12, 14, 15,…

PHP RBL Checker

The following code checks an IP address (defaults to the visitors IP address) with 81 RBL servers worldwide! <?php $rbl = array( ‘asiaspam.spamblocked.com’, ‘bl.deadbeef.com’, ‘bl.emailbasura.org’, ‘bl.spamcop.net’, ‘blackholes.five-ten-sg.com’, ‘blacklist.woody.ch’, ‘bogons.cymru.com’, ‘cbl.abuseat.org’, ‘cdl.anti-spam.org.cn’, ‘combined.abuse.ch’, ‘combined.rbl.msrbl.net’, ‘db.wpbl.info’, ‘dnsbl-1.uceprotect.net’, ‘dnsbl-2.uceprotect.net’, ‘dnsbl-3.uceprotect.net’, ‘dnsbl.abuse.ch’, ‘dnsbl.ahbl.org’, ‘dnsbl.cyberlogic.net’, ‘dnsbl.inps.de’, ‘dnsbl.njabl.org’, ‘dnsbl.sorbs.net’, ‘drone.abuse.ch’, ‘duinv.aupads.org’, ‘dul.dnsbl.sorbs.net’, ‘dul.ru’, ‘dyna.spamrats.com’, ‘dynip.rothen.com’, ‘eurospam.spamblocked.com’, ‘fl.chickenboner.biz’, ‘http.dnsbl.sorbs.net’, ‘images.rbl.msrbl.net’, ‘ips.backscatterer.org’, ‘isps.spamblocked.com’, ‘ix.dnsbl.manitu.net’, ‘korea.services.net’, ‘lacnic.spamblocked.com’, ‘misc.dnsbl.sorbs.net’, ‘noptr.spamrats.com’, ‘ohps.dnsbl.net.au’, ‘omrs.dnsbl.net.au’, ‘orvedb.aupads.org’, ‘osps.dnsbl.net.au’,…

Floating Trump Balloon!

I’m working on a ‘Floating Trump Blimp’ javascript thing for WordPress using jqFloat and jQuery. Although I have never written anything for wordpress at all in my life apart from borderline crap content, but here it is in its infinite glory: It’s a simple affair- Include jqFloat.js (found at http://www.inwebson.com/jquery/jqfloat-js-a-floating-effect-with-jquery/) after your jQuery include, and add an image to the page. I gave…