This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://hub.docker.com/r/sparanoid/php-fpm | |
version: '3' | |
services: | |
nginx: | |
image: nginx:alpine | |
restart: always | |
ports: | |
- 8080:80 | |
# Enable 443 on production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo file_put_contents('file.txt', 'bar'); | |
echo file_get_contents('file.txt'); // bar | |
echo "<br />"; | |
file_put_contents('file.txt', 'foo'); | |
echo file_get_contents('file.txt'); // foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add filter for creating a custom post link | |
add_filter( 'post_type_link', 'nstrm_changepost_link_slug', 10, 3 ); | |
function nstrm_changepost_link_slug( $post_link, $post, $leavename ) { | |
if ( 'post-type-name' != $post->post_type || 'publish' != $post->post_status ) { | |
return $post_link; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Facetwp preselect */ | |
add_filter( 'facetwp_preload_url_vars', 'nstrm_filter_facets' ); | |
function nstrm_filter_facets( $url_vars ) { | |
// get post uri | |
$uri = FWP()->helper->get_uri(); | |
// get post id | |
$post_id = nostromo_get_post_id_by_post_name( $uri ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body .gform_wrapper ul.gform_fields:not(.top_label):last-child > li.gfield_html_formatted:last-child { | |
margin-left: 0!important; | |
width:100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# get image | |
# adjust 3840x2160 to your screen resolution | |
wget -O /home/xxxxx/Pictures/wallpaper.jpg https://source.unsplash.com/random/3840x2160/?wallpaper | |
# add logo | |
convert /home/xxxxx/Pictures/wallpaper.jpg -page +100+50 /home/xxxxx/Pictures/logo.png -flatten /home/xxxxxx/Pictures/wallpaper-logo.jpg | |
# set wallpaper |