Skip to content

Instantly share code, notes, and snippets.

View kLOsk's full-sized avatar
:octocat:
back in black

Daniel Klose kLOsk

:octocat:
back in black
View GitHub Profile
@kLOsk
kLOsk / functions.php
Created July 31, 2020 13:36
facetwp date url vars
<?php
//load current cw plus 4 weeks on front page date facet
add_filter( 'facetwp_preload_url_vars', function( $url_vars ) {
if ( '' == FWP()->helper->get_uri() ) {//frontpage
if ( empty( $url_vars['date_facet'] ) ) {
$week = date("W");
$year = date("Y");
$start_day = date("Y-m-d", strtotime("{$year}-W{$week}-1"));//return monday of this week
$end_day = date("Y-m-d", strtotime("{$year}-W{$week}-7 +3 weeks")); //return sunday in 4 weeks
//error_log($start_day);
@kLOsk
kLOsk / fridge.ino
Created June 18, 2017 00:54
Arduino Curing Fridge
//Libraries
#include <DHT.h>; //need for temp/hum sensor
//#include <Time.h> //need for timer
//#include <TimeLib.h> //need for timer
//#include <SPI.h>//not sure
#include <Wire.h>//not sure
#include "RTClib.h" //need for clock
#include <Adafruit_SSD1306.h> //need for display