Skip to content

Instantly share code, notes, and snippets.

@tylerzey
tylerzey / yoast_seo_sitemap_add_external.php
Created January 29, 2018 18:49 — forked from amboutwe/yoast_seo_sitemap_add_custom_type.php
Add External Sitemap to Yoast Sitemap Index
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Add External Sitemap to Yoast Sitemap Index
* Credit: Paul https://wordpress.org/support/users/paulmighty/
* Last Tested: Aug 25 2017 using Yoast SEO 5.3.2 on WordPress 4.8.1
*********
* This code adds two external sitemaps and must be modified before using.
* Replace http://www.example.com/external-sitemap-#.xml
with your external sitemap URL.
@tylerzey
tylerzey / yoast-seo-sitemap.php
Created January 29, 2018 18:50 — forked from mohandere/yoast-seo-sitemap.php
Wordpress yoast seo plugin, generate custom sitemap for custom URLS
<?php
/**
* Create a new custom yoast seo sitemap
*/
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' );
add_action( 'init', 'init_wpseo_do_sitemap_actions' );
// Add custom index
@tylerzey
tylerzey / slack_delete.py
Created February 8, 2018 16:18 — forked from jackcarter/slack_delete.py
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@tylerzey
tylerzey / mac-php-composer-setup.md
Created February 16, 2018 21:25 — forked from tomysmile/mac-php-composer-setup.md
Setup PHP Composer using Brew
@tylerzey
tylerzey / s_class_example
Created March 16, 2018 21:33
adding / removing class with js for s
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
found here: https://www.youtube.com/watch?v=m-NYyst_tiY
var people = {
people: ['Will', 'Steve'],
init: function() {
this.cacheDom();
this.bindEvents();
this.render();
},
cacheDom: function() {
this.$el = $('#peopleModule');
@tylerzey
tylerzey / regex.js
Last active August 5, 2020 13:53
A List Of Helpful Regex Examples
let re;
//this looks for the string between the slashes. it'll match hello but not HeLlo.
re = /hello/;
//the lower case i means be case insensitive. this will match HellO.
re = /hello/i;
// explaination for common search characters
.select-picker {
background-color: #f5f7fa;
-webkit-appearance: none;
-moz-appearance: none;
min-height: 46px;
padding-left: 1.5em !important;
width: 100%;
font-weight: 700;
border: 1px solid #dae1e9;
@tylerzey
tylerzey / Makefile
Created March 10, 2019 17:29 — forked from mcastilho/Makefile
Makefile for Medium article
.PHONY: all tags clean test build install generate image release
REGISTRY_REPO = <..redacted..>
OK_COLOR=\033[32;01m
NO_COLOR=\033[0m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
# Build Flags
const path = require('path');
const fs = require('fs');
const glob = require('glob-all');
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
const PurgecssPlugin = require('purgecss-webpack-plugin');
module.exports = {