Skip to content

Instantly share code, notes, and snippets.

View kennyeliason's full-sized avatar

Kenny Eliason kennyeliason

View GitHub Profile
@kennyeliason
kennyeliason / numeric-page-navi.php
Created June 22, 2018 16:42
Numeric Page Navigation for Roots Sage Theme
// Numeric Page Navi
function page_navi($before = '', $after = '')
{
global $wpdb, $wp_query;
$request = $wp_query->request;
$posts_per_page = intval(get_query_var('posts_per_page'));
$paged = intval(get_query_var('paged'));
$numposts = $wp_query->found_posts;
$max_page = $wp_query->max_num_pages;
if ($numposts <= $posts_per_page) {return;}
@kennyeliason
kennyeliason / keybindings
Created June 27, 2018 17:54
sublime key bindings
[
{ "keys": ["command+shift+r"], "command": "reindent"},
{ "keys": ["ctrl+k", "ctrl+i"], "command": "title_case" }
]
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_face": "Roboto Mono",
"font_size": 13,
"ignored_packages":
[
],
"line_padding_bottom": 10,
"line_padding_top": 10,
@kennyeliason
kennyeliason / makewpsuck.sh
Last active September 25, 2024 18:33
Make WP Suck Less or More
#!/bin/bash
# Make sites into bedrock or normal WordPress
# Version 2.0
# Copyright (c) Kenny Eliason
set -a
source .env
set +a
@kennyeliason
kennyeliason / google-sheets-domain-fetch.txt
Created April 1, 2024 22:46
Google Sheets Domain Finder FETCH Script
function FETCH(url1) {
var response = UrlFetchApp.fetch(url1);
var json = JSON.parse(response.getContentText());
var output = [];
for (var i = 0; i < json.length; i++) {
var company = json[i];
output.push(company.name);
output.push(company.domain);
output.push(company.logo);