Skip to content

Instantly share code, notes, and snippets.

View brigleb's full-sized avatar

Raymond Brigleb brigleb

View GitHub Profile
@brigleb
brigleb / plugin-manager.php
Last active April 16, 2023 15:32
This plugin helps manage other WordPress plugins by tracking who installed them, the installation date, and a description. Just put in a folder of the same name, in the Plugins directory.
<?php
/*
Plugin Name: Plugin Manager
Description: This plugin helps manage other plugins by tracking who installed them, the installation date, and a description.
Version: 1.0
Author: Needmore Designs
*/
// Create custom table
function pm_create_table()
@brigleb
brigleb / front-page.php
Last active March 7, 2018 15:08
How I like to load ACF loops. `front-page.php` is an example template, calling multiple layouts. Alternately, the second example just finds out what layouts are used and calls them by name. Note the underscore is used in place of a forward slash.
<main>
<?php get_template_part( 'parts/layouts/home', 'intro' ); ?>
<?php get_template_part( 'parts/layouts/home', 'slider' ); ?>
<?php get_template_part( 'parts/product', 'grid' ); ?>
<?php get_template_part( 'parts/layouts/home', 'outro' ); ?>
<?php // or, you can just try to load them ALL, from the next template ?>
<?php get_template_part('parts/content', 'layouts'); ?>
@orumad
orumad / wordpress-valet-install.md
Last active December 23, 2021 09:59
How to install Wordpress from command line in Valet

How to install Wordpress from command line in Valet

I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)

This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.

Install 'WP-CLI' command line tool

@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 24, 2023 14:25
How to set up Gulp for Craft CMS. Includes SASS compilation and minification, JavaScript minification, livereloading, and browser sync.

How to set up Gulp with a Craft CMS project

I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).

Project Directory Structure

  • project root/
    • craft/
      • templates/
  • (your craft template files)
@rosswintle
rosswintle / edit-divi-footer.php
Last active October 8, 2017 20:49
Edit Divi Footer plugin
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@brigleb
brigleb / developer-goals.md
Last active August 29, 2015 14:05
Developer Goals at Needmore

One of the most important concepts to understand at Needmore is Kaizen. This means continual improvement. Apply this to everything you see below. The following are just guidelines, part of your job is to keep improving, getting better, refining the process, learning, and teaching.

Your goal as a member of the Needmore team is to feel empowered to make sure that you continue to improve, and we do as well. We don't expect you to do something just because it's written here, we expect you to do it better. Learn how to improve the process to end up with a better result, with less mistakes, with less problems. Don't keep doing something a certain way because that's the way we've been doing it.

There are six key aspects to being a successful, productive part of development at Needmore.

Process

Get comfortable using Trello for development and issue tracking. Make sure you use it in a way you can keep the whole team in the loop at all times. Remember to notify the project manager when making changes tha

@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@brigleb
brigleb / github-advice.md
Last active December 19, 2015 21:58
Some words of wisdom for our internal use of GitHub at Needmore.

Tips for using Git and GitHub

Git repositories should be named after the domain name of the project. If that's not possible, get as close as you reasonably can. The best name for www.masusushi.com repository is probably masusushi.

The master branch should always contain production-ready code. It should be ready to deploy to the server at any time. If someone else wants to deploy, all they should need to do is run it through a preprocessor that supports Compass (like CodeKit).

If we have a staging server in use, also use a dev branch which corresponds to that server. If we just have a staging server that will sort of become the actual server, don't worry about it. In that case, just using master is a-ok.

When you deploy, tag that commit. If you're deploying to production, deploy from the master branch. If you're deploying to staging, deploy from dev branch. When you merge to master (and dev), you should deploy right away. A very good time to tag and deploy an active project is at th

@johnpolacek
johnpolacek / gist:3827270
Last active January 20, 2023 15:46
Prevent FOUC
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ -->
<style type="text/css">
.no-fouc {display: none;}
</style>
<script type="text/javascript">
document.documentElement.className = 'no-fouc';
// add to document ready: $('.no-fouc').removeClass('no-fouc');
</script>