Skip to content

Instantly share code, notes, and snippets.

View BaronVonPerko's full-sized avatar

Chris Perko BaronVonPerko

View GitHub Profile
@BaronVonPerko
BaronVonPerko / gulpfile.js
Last active August 24, 2023 08:27
Gulpfile for SCSS and Tailwind
var gulp = require('gulp');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
gulp.task('style', function () {
var tailwindcss = require('tailwindcss');
return gulp.src('sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(postcss([
@BaronVonPerko
BaronVonPerko / delete-branches.sh
Last active April 20, 2020 12:44
Delete all branches except master
#!/bin/bash
git branch | grep -v "master" | xargs git branch -D
@BaronVonPerko
BaronVonPerko / settings.json
Created October 29, 2020 22:38
My personal settings file for Windows Terminal
// This file was initially generated by Windows Terminal Preview 1.3.2382.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@BaronVonPerko
BaronVonPerko / nginx-wordpress-gzip-cache
Created December 4, 2020 21:02
nginx configuration for gzip and browser caching - great for wordpress running on a Laravel Forge managed server.
#GZIP
# Enable gzip compression.
gzip on;
# Compression level (1-9).
# 5 is a perfect compromise between size and CPU usage, offering about
# 75% reduction for most ASCII files (almost identical to level 9).
gzip_comp_level 5;
# Don't compress anything that's already small and unlikely to shrink much
@BaronVonPerko
BaronVonPerko / shopify-fuzzy-search.js
Last active September 10, 2021 21:13
Example javascript to make fuzzy search work a bit better in a Shopify theme
const search_forms = document.getElementsByClassName('search-bar');
updateInputs(false); // on load, remove any wildcards from the search box
[...search_forms].forEach(form => {
form.addEventListener('submit', e => {
updateInputs(true);
});
});