Skip to content

Instantly share code, notes, and snippets.

@chefblogger
chefblogger / function.php
Last active Aug 21, 2020
Hide DIVI Project Post Type
View function.php
/*================================================
#3 Divi Project verstecken
Mehr Infos unter
https://www.chefblogger.me/2020/08/21/divi-project-post-type-entfernen-oder-verstecken/
================================================*/
add_filter('et_project_posttype_args', 'mytheme_et_project_posttype_args', 10, 1);
function mytheme_et_project_posttype_args($args) {
return array_merge($args, array(
'public' => false,
@chefblogger
chefblogger / htaccess
Created Aug 21, 2020
#301 Redirects for .htaccess
View htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@chefblogger
chefblogger / zeitraffer.py
Last active Feb 6, 2021
Raspberry Pi: Macht alle x Sekunden ein Bild und speichert es ab
View zeitraffer.py
from picamera import PiCamera
from time import sleep
camera = PiCamera()
bilder_nummer = 0
while True:
sleep(20) # bild wird alle 20 sekunden gemacht
bilder_name = 'bild{0:05d}.jpg' .format(bilder_nummer) #die bilder heissen bilder00001.jpg
camera.capture(bilder_name)
View Binäre Uhrzeit
<div id="refresh"></div>
<div id="time">
<?php
date_default_timezone_set("Europe/Berlin");
$timestamp = time();
$stunde = date("H",$timestamp);
$minute = date("i",$timestamp);
$sekunde = date("s",$timestamp);