Skip to content

Instantly share code, notes, and snippets.

View KevinBatdorf's full-sized avatar
⚔️
I am undefined

Kevin Batdorf KevinBatdorf

⚔️
I am undefined
View GitHub Profile
@KevinBatdorf
KevinBatdorf / .zshrc
Last active April 29, 2018 06:13
.zshrc Win10
# SOME NOTES
#
# Install apt-cyg after cygwin
#
# Make sure to install packages from cygwin instead of choco
# cURL, for example, won't work. Also, install PHP with extensions.
# php php-json php-mbstring php-phar php-posix php-zip
export ZSH=/home/Kevin/.oh-my-zsh
@KevinBatdorf
KevinBatdorf / after.sh
Last active August 12, 2018 12:42
Homestead after.sh Win10
#!/bin/sh
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
if [ ! -f /usr/local/extra_homestead_software_installed ]; then
echo 'installing some extra software'
@KevinBatdorf
KevinBatdorf / functions.php
Created August 25, 2017 17:40
Disable touch events on MetaSlider for FlexSlider
<?php
function add_pause_on_action($options) {
return array_merge($options, ['touch' => 'false']);
};
add_filter('metaslider_flex_slider_parameters', 'add_pause_on_action');
@KevinBatdorf
KevinBatdorf / ThemosisValetDriverOld.php
Last active December 2, 2019 16:27
Laravel Valet driver for Themosis v1.3
<?php
class ThemosisValetDriverOld extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
@KevinBatdorf
KevinBatdorf / metaslider-disable-jetpack.php
Created May 28, 2019 17:27
Jetpack breaks images on MetaSlider, and this disabled JetPack from doing so.
<?php
add_filter('jetpack_photon_skip_image', 'metaslider_remove_jetpack', 10, 2);
add_filter('jetpack_lazy_images_skip_image_with_attributes', 'metaslider_remove_jetpack', 10, 2);
function metaslider_remove_jetpack($val, $src) {
// The lazy load filter send the src as a param
$src = isset($src['src']) ? $src['src'] : $src;
// Get an array of slideshow images
@KevinBatdorf
KevinBatdorf / nginx-expires-nextgen
Last active June 8, 2019 17:39
nginx webp express + expires to add to an existing nginx config
# There is a lot of stuff before here
location ~* \.(css|js|ico|gif|webp|svg|eot|otf|woff|woff2|ttf|ogg)$ {
expires 365d;
}
location ~* ^/?content/.*\.(png|jpe?g)$ {
add_header Vary Accept;
expires 365d;
if ($http_accept !~* "webp") {
@KevinBatdorf
KevinBatdorf / cloudSettings
Last active April 30, 2020 19:16
VS Code Settings
{"lastUpload":"2020-04-30T19:16:34.290Z","extensionVersion":"v3.4.3"}
@KevinBatdorf
KevinBatdorf / ThemosisValetDriver.php
Created November 30, 2019 11:46
Themosis version 2 Valet driver
<?php
class ThemosisValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@KevinBatdorf
KevinBatdorf / metaslider-ken-burns-effect.php
Last active November 3, 2023 06:34
Add a Ken Burns effect to MetaSlider using FlexSlider
<?php
$slideshow_id = '236';
add_filter('metaslider_css_classes', function($classes, $id) use ($slideshow_id) {
if ($id != $slideshow_id) return $classes;
return $classes . ' kenburns-effect';
}, 10, 2);
add_filter('metaslider_css', function($css, $settings, $id) use ($slideshow_id) {