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 / oreilly.css
Created April 23, 2022 01:36
Use device native fonts by default in O’Reilly reader interface
/* Variables so we can try alternates. You can use serif fonts,
for example, by transposing some lines. */
body {
--font-variable-width: -apple-system-ui-serif, ui-serif, Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
--font-variable-width: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-monospace: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
}
/* General text */
body,
@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'); ?>
@brigleb
brigleb / move_git.sh
Last active September 9, 2015 01:03
Move a git file from one host to another
#!/bin/bash
# move_git - A script to move a repo from bitbucket to beanstalk
# Assumes you use a ~/Sites folder for these things, and are in it?
# Will leave behind a tarred zipfile of the repository.
# Note: Remember to create the repo in Beanstalk first!
# Usage: move_git.sh repo_name
@brigleb
brigleb / project-outline.md
Last active August 29, 2015 14:13
General Project Outline
  1. Planning
  • Project Statement, Requirements Document
  • Content Inventory and Mood Boards
  • Site Map and Wireframes
  • Pre-Build Test
  1. Building
  • Design
  • Development
    • Markup layer
    • Element layer
@brigleb
brigleb / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@brigleb
brigleb / designer-goals.md
Last active August 29, 2015 14:12
Designer Goals at Needmore
  • Be an expert on web technologies involving images, typography, and layout.
  • Understand the goals and concept of a design.
  • Make a sitemap and wireframes that
    • look professional
    • answer the goals of the project and needs of the client
  • Mock up the website in Sketch or Photoshop,
    • Organizing and naming the layers intelligently
    • Using symbols and styles wherever possible
    • Build the style guide alongside the mockups
  • Hand off all required assets for production, including
@brigleb
brigleb / grunt-plugins.md
Last active August 29, 2015 14:12
Grunt Plugins

Of course you need grunt to start with. And then...

Solid

  • grunt-contrib-watch
  • grunt-contrib-uglify
  • grunt-contrib-imagemin
  • grunt-contrib-sass (or use faster/better grunt-sass?)
  • grunt-contrib/jshint
  • grunt-autoprefixer
@brigleb
brigleb / Gruntfile.js
Last active August 29, 2015 14:12
Gruntfile for the Sass-based Underscores WordPress theme - work in progress.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkgc: grunt.file.readJSON('package.json'),
// Watch files that may change and should trigger updates
watch: {
sass: {
files: ['sass/*.{scss,sass}', 'sass/**/*.scss'],
@brigleb
brigleb / reading.md
Last active August 29, 2015 14:12
Reading suggestions and Developer Resources

I have some reading for you guys.

  1. Be sure you get SSH and the keys. http://opensourcehacker.com/2012/10/24/ssh-key-and-passwordless-login-basics-for-developers/
  2. We will at points in our lives be using pull requests more/again. Read chapter 10 of Git in Practice, that book we just got and is sitting out here. It covers PR's and how to use them from the command line.
  3. Read up on tmux sometime, I think it would save us all a lot of time. http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1
  4. In time, I am hoping we can move more toward Bourbon, Neat, and Bitters. http://bourbon.io/ Please look into those. Thoughtbot are really bright people. Trust me on that one.
  5. Remember that we also have an excellent Grunt book. I'd like us to improve our use of Grunt in our workflow, and add our best version to our fork of Underscores. (see http://mattbanks.me/grunt-wordpress-development-deployments/ for ideas)

Helpful developer resources