- download and unzip stable RealtimePi distro
- write the extracted .img to sdcard with Etcher
#include "FastLED.h" | |
// How many leds in your strip? | |
#define NUM_LEDS 8 | |
// Data pin for the LEDs | |
#define DATA_PIN 17 | |
// Potentiometer pins | |
#define POT_0_PIN A0 |
<?php | |
add_filter( 'authenticate', 'rkv_disable_username_logins', 20, 3 ); | |
/** | |
* Disable admin username and redirect to Google (or another site). | |
* | |
* @param object $user The WP_User object. | |
* @param string $username The entered username. | |
* @param string $password The entered password. | |
* |
<?php | |
/** | |
* Plugin Name: AffiliateWP - Modify Referral If Virtual Product (WC) | |
* Plugin URI: https://affiliatewp.com | |
* Description: Modify referral rate | |
* Author: AffiliateWP Team | |
* Author URI: https://affiliatewp.com | |
* Version: 1.0 | |
*/ | |
function prefix_affwp_modify_referral_if_virtual( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) { |
server { | |
listen 80; | |
listen [::]:80; | |
server_name robertnealan.com; | |
root /var/www/ghost/system/nginx-root; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
<?php | |
class Beer { | |
const NAME = 'Beer!'; | |
public static function printed(){ | |
echo 'static Beer:NAME = '. static::NAME . '<br />'; | |
} | |
} | |
class Ale extends Beer { |
<?php | |
/** | |
* Adds 'Affiliates' Toolbar links in the My Sites drop-down. | |
* | |
* @param WP_Admin_Bar $wp_admin_bar Toolbar instance. | |
*/ | |
function affiliate_toolbar_links( $wp_admin_bar ) { | |
foreach ( $wp_admin_bar->user->blogs as $blog ) { | |
$blog_id = $blog->userblog_id; |
<?php | |
$filename = 'csvdata.csv'; | |
header( 'Content-type: text/plain' ); | |
if ( $data = fopen( $filename, 'r' ) ) { | |
// Snag the first row as column headers | |
$cols = fgetcsv( $data ); |
<?php | |
$form_id = 12; // Or whatever form ID has the notificaiton you're after | |
$form = GFAPI::get_form( $form_id ); | |
$notification = end( $form['notifications'] ); // Just an easy way to get the notification I wanted. YMMV. | |
$lead = array( | |
'id' => wp_generate_password( 64, true, true ), // Normally, this would be the Lead ID. Not necessary for us. | |
'form_id' => $form_id, | |
'source_url' => 'https://site.com/', | |
'status' => 'active', | |
'1.3' => $args['first_name'], // YMMV on these args - set them to whatever your form sets them to be. |