Skip to content

Instantly share code, notes, and snippets.

View Kernix13's full-sized avatar
Still looking for a job - but losing hope

Jim Kernicky Kernix13

Still looking for a job - but losing hope
View GitHub Profile
Kernix13 / recent-posts-category.php
Created July 26, 2023 15:21
WordPress Category Recent Posts
View recent-posts-category.php
<!-- Add before endwhile in single.php or as a plugin -->
<aside class="bgcolor4">
<div class="container">
<h3 class="custom-title"><?php esc_html_e('Similar articles you may like... ', 'tower') ?></h3>
<div class="row">
$cats = wp_get_post_categories( get_the_ID(), ['fields'=>'ids',]);
$relatedPosts = get_posts(
Kernix13 / recent-posts-custom-query.php
Last active July 26, 2023 15:18
WordPress Recent Posts Custom Query
View recent-posts-custom-query.php
<!-- Add to a plugin or in front-page.php for a custom theme -->
<aside class="bgcolor4">
<div class="container">
<h3 class="custom-title"><?php esc_html_e('Latest Articles ', 'tower') ?></h3>
<div class="row">
$query = new WP_Query( [
'post__not_in' => get_option( 'sticky_posts'),
'post_type' => 'post',
Kernix13 /
Created September 19, 2022 12:48 — forked from bradtraversy/
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

Kernix13 / SplitSortFilterStr.js
Last active September 16, 2022 21:04
JavaScript function to split, sort, and filter out repeats from a string
View SplitSortFilterStr.js
// Function to sort words then strip out repeats
// Used to get unique keywords from different web languages/tools I've used to get ideas for blog posts. I tend to have a lot of repeats...
const commaSeparated = "split, sort, and, filter, strings, separated, by, commas, with, no, repeats, repeats, repeats";
const spaceSeparated = "split sort and filter strings separated by spaces with no repeats repeats repeats";
let commaWords = [];
let spaceWords = [];
function splitStrings(str, separator, output) {
Kernix13 / hamburgerMenu.css
Last active November 22, 2022 13:30
Mobile first responsive hamburger menu
View hamburgerMenu.css
*, *::before, *::after {
box-sizing: border-box;
body {
padding: 0;
margin: 0;
header {
Kernix13 / BlogTitleUrl.js
Created September 15, 2022 15:23
Convert blog title to URL slug (my first gist)
View BlogTitleUrl.js
const blogTitle = "How to create a GitHub Gist";
const urlSlug = blogTitle.toLowerCase().split(" ").filter(word => word !== "").join("-");
Kernix13 /
Created September 15, 2022 01:23 — forked from bradtraversy/
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen