Skip to content

Instantly share code, notes, and snippets.

/**
* iOS Style Scrollbar
*/
::-webkit-scrollbar {
width: 5px; /* Sets a thin width for the vertical scrollbar */
}
::-webkit-scrollbar-track {
background-color: transparent; /* Mimics the overlay style */
}
@StoyPenny
StoyPenny / new-bash-command-maker.md
Last active February 1, 2025 22:41
New Bash Command Making Script

New Bash Command Making Script

This is a simple script that makes the process of creating new bash commands easier.

After you get setup quickly, simply run the new-bash-script in your terminal and give an an argument of what you want the file and command to be called. This will then generate file in the right directory, make it executable, and then open a nano window for you to copy and paste your script or start writing from scratch. You may need to open a new terminal window after adding a new command so that it is registered in the terminal window.


Setting Things Ups

Create a new file

@StoyPenny
StoyPenny / local-wp-install-instructions.md
Last active August 7, 2020 22:16
Basic instruction template for setting up a local copy of a WordPress website's repository. Use and extend for your projects.

Welcome

The instructions below are a basic skeleton for creating a get started style guide for your wordpress repository. Feel free to use this as a base for your project, adding custom content as you need for your project.




Getting Started

Use the following as a guide on how to get started setting up your new development environment.

Clone Repo

@StoyPenny
StoyPenny / makefile
Last active January 13, 2023 21:21
A simple makefile for basic LAMP style VM's for basic web development.
lamp :
# Update the machine
sudo apt update
sudo apt upgrade -y
# Install Apache
sudo apt install apache2 -y
@StoyPenny
StoyPenny / docker-compose.yml
Created March 13, 2020 21:51
Docker Setup for WP Containers
version: '3.7'
services:
wp_db:
image: mysql:5.7
volumes:
- ./db_data/:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: hallpass
MYSQL_DATABASE: hallpass
@StoyPenny
StoyPenny / wp-config.md
Last active December 4, 2021 18:01
WordPress Configuration

Set Number of Post Revisions

WordPress comes with the ability to automatically store post revisions so that you have a complete timeline of edits for every post/page on your website. This can lead to massive bloat in your database over time. By default WordPress does not impose a limit on the number of revisions that your website will store, but you can set a custom limit with the following function.

define( 'WP_POST_REVISIONS', 2 );      // Set the number of post revisions to 2
define( 'WP_POST_REVISIONS', false );  // Disable post revisions

Set Autosave Interval

WordPress provides an autosave feature by default to ensure that you don't lose any/much content in the case of a technical incident. By default, WordPress will autosave a post/page every 60 seconds, you can control when this happens with the following function.

@StoyPenny
StoyPenny / powertools-for-wordpress.md
Created February 11, 2020 21:18
Powertools For WordPress

Powertools For WordPress

Here is a small collection of powerful WordPress tools to help speed up and enhance your development experience.

  • Generate WP - Tool for generating code for your themes and plugins using an intuitive GUI.
  • WP Hasty - A modern tool for generating code for your themes and plugins using an intuitive GUI.
  • WPPB - A simple tool to generate boilerplate code for your next WordPress plugin.
  • WP Stuffs - A collection of WordPress snippets.
  • WP Beginner - A website containing tons of giudes and articles related to WordPress.
@StoyPenny
StoyPenny / wp-page-template.md
Created February 11, 2020 21:15
WordPress Page Template - Template

WordPress Page Templates

WordPress comes ready to easily handle custom templates for your page layouts. Templates are a great way to easily manage layouts at scale. Templates & Custom Post Types combined with ACF data are an extremely powerful and flexible way to create and manage custom content on your WordPress powered wesbite.

Page Templates | Official Wordpress Documentation

Page Template Code

Here is the basic code that you need to get started creating your own custom template. You will likely want to copy the page content from your theme's page.php or index.php file to use as a starting point.

@StoyPenny
StoyPenny / wp-file-permissions.md
Last active February 11, 2020 21:16
WordPress File Permissions

WordPress File Permissions

This file is intended to be a quick reference guide on what standard WordPress file permissions should be.

Files

All files should be 644. Use the following command from the root directory of the website:

sudo find . -type f -exec chmod 644 {} +
@StoyPenny
StoyPenny / basic-wp-plugin-template.php
Created February 11, 2020 21:10
Basic WordPress Plugin Template
<?php
/*
Plugin Name: Test plugin
Description: A test plugin to demonstrate wordpress functionality
Author: Chris Steurer
Version: 0.0.1
*/
/**