Skip to content

Instantly share code, notes, and snippets.

View E-VANCE's full-sized avatar
🌳
Huggin'

Henning Orth E-VANCE

🌳
Huggin'
View GitHub Profile

Keybase proof

I hereby claim:

  • I am e-vance on github.
  • I am evance (https://keybase.io/evance) on keybase.
  • I have a public key ASCjzX3ZQIRthn0pKE-qClQyChsggyvdXpf6KB_lvE0vNgo

To claim this, I am signing this object:

@E-VANCE
E-VANCE / acf-home.php
Last active August 1, 2021 17:05
ACF Builder (Home fields)
<?php
/**
* HOME -- Slider
*/
$home_slider = new FieldsBuilder('home_slider');
$home_slider
->addRepeater('slider', ['min' => 1, 'max' => 5, 'layout' => 'table'])
->addImage('image')
->addText('title', [
@E-VANCE
E-VANCE / readme.md
Created June 2, 2021 14:50 — forked from nickcernis/readme.md
Exclude node_modules and .git from Backblaze backups on Mac

Exclude node_modules and .git from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add these rules inside the bzexclusions tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@E-VANCE
E-VANCE / nginx.conf
Created March 12, 2021 13:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@E-VANCE
E-VANCE / functions.php
Last active April 30, 2020 14:19 — forked from hirejordansmith/functions.php
Add support for ACF custom fields to WooCommerce Attributes
<?php
// Adds a custom rule type.
add_filter( 'acf/location/rule_types', function( $choices ){
$choices[ __('Other','acf') ]['wc_prod_attr'] = 'WC Product Attribute';
return $choices;
} );
// Adds custom rule values.
add_filter( 'acf/location/rule_values/wc_prod_attr', function( $choices ){
@E-VANCE
E-VANCE / animejs-random-covers.markdown
Created March 25, 2020 14:04
animeJS Random Covers
@E-VANCE
E-VANCE / acf-basic.php
Last active December 14, 2019 08:28
ACF Builder (Basic fields)
<?php
/**
* BASIC -- Header image
*/
$basic_page_header = new FieldsBuilder('basic_page_header');
$basic_page_header
->addImage('page_header_background_image')
->addText('page_header_title', [
'instructions' => 'Leave empty to use the site title / name',
# group_vars/{staging & production}/wordpress_sites.yml
[...]
wordpress_sites:
example.com:
site_hosts: [...]
[...]
matomo:
db:
user: matomo
host: localhost
@E-VANCE
E-VANCE / acf-field-location-values.md
Last active April 5, 2018 13:32
ACF field location values

Post

  • post_type
  • post_template
  • post_status
  • post_format
  • post_category
  • post_taxonomy
  • post
@E-VANCE
E-VANCE / functions.php
Created April 5, 2018 11:11 — forked from infn8/functions.php
Wordpress Bootstrap Image Sizes
function add_theme_features() {
// Add Image Sizes
$containerLG = 1170; // Change this if you have updated the largest bootstrap container width.
for ($i=1; $i <= 12; $i++) {
add_image_size(
'col-lg-'.$i,
ceil($containerLG / 12 * $i),
ceil($containerLG / 12 * $i) * 10,
false
);