Skip to content

Instantly share code, notes, and snippets.

View jamesfacts's full-sized avatar

James White jamesfacts

View GitHub Profile
@jamesfacts
jamesfacts / 1-setup.bash
Created May 4, 2017 23:06
Deploy scripts for Sage + WPEngine through Codeship Raw
# Setup
# Get around restriction on shallow pushes by WP Engine
git filter-branch -- --all
git checkout staging [OR ANY OTHER BRANCH]
# Add User Data
git config --global user.name "codeship-username"
git config --global user.email "[email protected]"
@jamesfacts
jamesfacts / 1_env_setup.bash
Last active September 26, 2017 22:09
Codeship CI script for Sage + WPE, with hashed Blade templates
# ssh [email protected] info
# get around restriction on shallow pushes by WP Engine
git filter-branch -- --all
git checkout master
git config --global user.name "${CI_COMMITTER_NAME}"
git config --global user.email "${CI_COMMITTER_EMAIL}"
# Combine remote git servers
git remote add servers $WPE_SERVERS
@jamesfacts
jamesfacts / css-colors.md
Created February 22, 2018 21:35
Attractive CSS colors

LightCoral FireBrick Coral DarkOrange Chocolate Khaki BlueViolet Indigo SlateBlue SpringGreen

Keybase proof

I hereby claim:

  • I am jamesfacts on github.
  • I am jamesfacts (https://keybase.io/jamesfacts) on keybase.
  • I have a public key ASAbc-93kS2pgt0xAuJYR44fbSIl19SJLkP0D5tueLesUAo

To claim this, I am signing this object:

image: php:7.2-cli
before_script:
# Updates
- curl -sL https://deb.nodesource.com/setup_10.x | bash
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update
- apt-get -y install yarn libpcre3-dev zlib1g-dev libbz2-dev libpng-dev libjpeg-dev nodejs git zip unzip curl rsync mysql-client
- docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr
FOLDER=wp-content/themes/
if [ "production" == "${CI_ENVIRONMENT_NAME}" ]; then
WPE_INSTALL=prod_install
elif [ "staging" == "${CI_ENVIRONMENT_NAME}" ]; then
WPE_INSTALL=staging_install
else
WPE_INSTALL=dev_install
fi
@jamesfacts
jamesfacts / deploy.sh
Created August 24, 2019 17:50
Circle CI deploy script
#!/usr/bin/env bash
# don't continue to execute if we encounter an error
# https://stackoverflow.com/questions/19622198/what-does-set-e-mean-in-a-bash-script
set -e
# prevent ssh from raising interactive prompt for new host keys
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
WPE_ENVIRONMENT=production
@jamesfacts
jamesfacts / .circleci.config.yml
Created August 24, 2019 18:15
Sample Circle CI config file
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
@jamesfacts
jamesfacts / menus.php
Created May 6, 2021 19:12
This adds tailwind classes to the output of navwalkers
<?php
namespace App;
/**
* Custom fork of WP's native Walker functionality revised so we can output
* classes for tailwind
*
*/
/**
@jamesfacts
jamesfacts / header.blade.php
Created May 6, 2021 19:17
header view template to match Tailwind walker
<header class="banner w-full bg-white border-grey-100 shadow-md">
<div class="menu-wrap flex items-center flex-wrap justify-between p-3 w-full z-20 max-w-screen-xl
sm:px-6 sm:py-5 lg:relative lg:mx-auto">
<div class="flex items-center flex-no-shrink max-w-2/3">
<a class="brand lg:block lg:pt-2" href="{{ home_url('/') }}">
<img src="{{\Roots\asset('images/brand.png')}}" alt="Brand"
class="max-w-200">
</a>
</div>