Skip to content

Instantly share code, notes, and snippets.

View REPTILEHAUS's full-sized avatar

Paddy REPTILEHAUS

View GitHub Profile

Keybase proof

I hereby claim:

  • I am reptilehaus on github.
  • I am reptilehaus (https://keybase.io/reptilehaus) on keybase.
  • I have a public key ASDz0bC-qJ3yo7FFt-zi1GAlqol4YBTEh41rjvB8dpRtAAo

To claim this, I am signing this object:

@REPTILEHAUS
REPTILEHAUS / Optimization Script.php
Created October 19, 2016 12:37
WP Nightly Image OptimizatioN
<?php
global $wpdb;
require('/var/www/yourwebsitesroot/wp-blog-header.php');
// require ( ABSPATH . 'wp-admin/includes/image.php' );
$images = $wpdb->get_results(
"SELECT ID
FROM $wpdb->posts
@REPTILEHAUS
REPTILEHAUS / introrx.md
Created December 23, 2016 19:16 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<?php
session_start();
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
define('APP_ID', '337348378287384');
define('APP_SECRET', '83d7gd238r74r8w7827565863864fds8');
define('REDIRECT_URL', 'http://yoursite.com/test.php');
<?php
function contactform7_before_send_mail( $form_to_DB ) {
global $wpdb;
$form_to_DB = WPCF7_Submission::get_instance();
if ( $form_to_DB )
$formData = $form_to_DB->get_posted_data();
/*
Script by @REPTILEHAUS
by Paddy O'Sullivan
*/
// Assign each of our input pins to an integer variable
int LED_one = 13;
int LED_two = 12;
int LED_three = 11;
int LED_four = 10;
<?php
// SPECIFY USB PORT TO USE
$usb_comPort = "COM4";
switch($_POST)
{
case isset($_POST['submitOn']):
exec("ECHO 1 > $usb_comPort"); // Turn On LED 1
break;
case isset($_POST['submitOff']):
<?php
// SPECIFY USB PORT TO USE
$usb_comPort = "COM4";
switch($_POST)
{
case isset($_POST['submitOn']):
exec("ECHO 1 > $usb_comPort"); // Turn On LED 1
break;
case isset($_POST['submitOff']):
// Assign each of our input pins to an integer variable
int LED_one = 13;
void setup() {
Serial.begin( 9600 );
pinMode( LED_one, OUTPUT );
}
void loop() {
' Connection String required to connect to MS Access database
' PLEASE CHANGE data source= to the path where your ACCESS DATABASE file is on your C:\ drive
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files (x86)\Smartlaunch\Server\Data\DB\Smartlaunch.mdb;"
'Create todays date for use in the Access query
dim dt
dt = Date()
sql = "SELECT SUM(Transactions) AS Sales FROM FinancialTransactions WHERE Date > #"&dt&"# "