Skip to content

Instantly share code, notes, and snippets.

View jesgs's full-sized avatar
🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
View GitHub Profile
@jesgs
jesgs / README-WordPress-FULLTEXT-Search.md
Last active April 3, 2024 03:21
WordPress Full Text Search Examples

Adding MySQL FULLTEXT Support to WordPress

FULLTEXT support to WordPress is simple if you have access to phpMyAdmin. If not, it can still be done but is a little trickier if you’re not used to command-line. We’ll demonstrate how to modify your WordPress database using phpMyAdmin.

How To Modify Database

  1. Start out by having a set of keywords to test against. You’ll need ‘before’ and ‘after’ test results. Also, I can’t stress this enough but back up your database before proceeding!

  2. Next, log into your phpMyAdmin page and navigate to your {prefix}_posts table.

  3. Click on the “Structure” tab.

@jesgs
jesgs / rename_all_bones.py
Last active October 22, 2023 15:52
Python script for renaming armature bones in Blender. Specific to figures being imported from Daz Studio/Poser to Blender.
import bpy
import re
def rename_all_bones():
armature = bpy.context.active_object
bones = armature.data.bones
for bone in bones:
new_name = rename_bone(bone.name)
if new_name is not "":
@jesgs
jesgs / post-order-attribute-fix.php
Last active August 24, 2023 09:22
Fixes issue with menu_order not saving properly with Gutenberg
<?php
/**
* Add page attributes to post
*/
function mytheme_add_post_attributes()
{
add_post_type_support('post', 'page-attributes');
}
add_action('init', 'mytheme_add_post_attributes', 500);
<?php
/**
* Retrieve range of zip codes within given radius as
* determined by $rad
* Taken from http://www.movable-type.co.uk/scripts/latlong-db.html
*
* @global wpdb $wpdb
*
* @param integer $zip Zip code to query for
* @param integer $radius Radius in miles
@jesgs
jesgs / deploying-from-github-to-vps-using-travis-ci.md
Last active September 12, 2022 19:39
Deploying from Github to VPS using Travis CI

From: https://www.jesgs.com/blog/2017/12/18/deploying-from-github-to-vps-using-travis-ci

Recently, I spent around 14 to 16 hours learning all of the necessary steps to getting an existing repo set up with Travis CI to run unit tests, and then once successful, connect to a remote server that isn't a PaaS (in this case, Linode) and then proceeds to use Git hooks to do post deployment things.

Starting with your local machine and you have your project already checked out from Github.

Setting Up

  • Assuming you have Ruby (at least 2.3.1) installed, run gem install travis. This installs the Travis CI command-line tools. We're going to use these tools to encrypt RSA keys that Travis will use to connect to your remote server.
  • This tutorial also assumes that you have a working repo and a Travis-CI account set up.
@jesgs
jesgs / index.html
Created February 20, 2019 02:38
Moon Phase
<div class="wrapper">
<header class="row">
<h1 class="h h1">MoonPhase App</h1>
</header>
<div class="row">
<ul class="data-table h3">
<li>
<strong class="label">Current Date</strong><span class="value js-current-date-value"></span>
</li>
@jesgs
jesgs / composer.json
Created July 29, 2020 15:50
Composer install scripts for WordPress and Homestead
{
"name": "jesgs/wordpress-project",
"type": "project",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"require": {
@jesgs
jesgs / config.json
Last active October 26, 2019 17:34
Fadecandy Config
{
"listen": ["127.0.0.1", 7890],
"relay": [null, 7891],
"verbose": true,
"color": {
"gamma": 2.5,
"whitepoint": [1.0, 1.0, 1.0]
},
.control-extend {
&__label {
display: none;
@media only screen and (min-width: 768px) {
display: inline-block;
font-weight: 800;
cursor: pointer;
color: black;
&:hover {
@jesgs
jesgs / Contract Killer 3.md
Created May 8, 2018 03:56 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post