Skip to content

Instantly share code, notes, and snippets.

🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
Block or report user

Report or block jesgs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jesgs
jesgs / deploying-from-github-to-vps-using-travis-ci.md
Last active Feb 9, 2020
Deploying from Github to VPS using Travis CI
View deploying-from-github-to-vps-using-travis-ci.md

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 / README-WordPress-FULLTEXT-Search.md
Last active Jan 18, 2020
WordPress Full Text Search Examples
View README-WordPress-FULLTEXT-Search.md

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 / config.json
Last active Oct 26, 2019
Fadecandy Config
View config.json
{
"listen": ["127.0.0.1", 7890],
"relay": [null, 7891],
"verbose": true,
"color": {
"gamma": 2.5,
"whitepoint": [1.0, 1.0, 1.0]
},
@jesgs
jesgs / post-order-attribute-fix.php
Last active Oct 22, 2019
Fixes issue with menu_order not saving properly with Gutenberg
View post-order-attribute-fix.php
<?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);
View accordion.scss
.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 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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

@jesgs
jesgs / Three Wise Monkeys.md
Created May 8, 2018 — forked from malarkey/Three Wise Monkeys.md
Three Wise Monkeys (NDA)
View Three Wise Monkeys.md

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@jesgs
jesgs / GDPR.md
Created Apr 23, 2019 — forked from malarkey/GDPR.md
(Data) Protection Racket
View GDPR.md
@jesgs
jesgs / .travis.yml
Last active Apr 21, 2019
Bare-bones .travis.yml file.
View .travis.yml
language: php
php:
- 7.1.11
dist: trusty
sudo: false
services:
- mysql
View table-size-calc.sql
SELECT
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES
WHERE table_schema NOT IN ('performance_schema', 'mysql', 'information_schema')
ORDER BY (data_length + index_length) DESC;
You can’t perform that action at this time.