Skip to content

Instantly share code, notes, and snippets.

View timnolte's full-sized avatar

Tim Nolte timnolte

View GitHub Profile
@timnolte
timnolte / composer-private-package-github-token.md
Created February 16, 2024 20:32 — forked from 1242035/composer-private-package-github-token.md
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@timnolte
timnolte / wp-redis-site-health.php
Last active June 14, 2023 01:54
WP Redis Site Health
<?php
/**
* Plugin Name: Redis Customizations
* Description: Custom functions, filters and action hooks for additional Redis support.
*
* @package MuPlugins
*/
/**
* Adds Redis Support Information to the WordPress Site Health Info.
@timnolte
timnolte / wp-redis.patch
Last active June 14, 2023 01:51
WP Redis Plugin Patch
diff --git a/object-cache.php b/object-cache.php
index 05c6526..8bfb7cb 100644
--- a/object-cache.php
+++ b/object-cache.php
@@ -1238,29 +1238,33 @@ class WP_Object_Cache {
* with defaults applied.
*/
public function build_client_parameters( $redis_server ) {
+ // Default Redis port.
+ $port = 6379;
@timnolte
timnolte / README.MD
Created October 6, 2020 22:53 — forked from hardfire/README.MD
using cgroups to limit browser memory+cpu usage
  1. cgconfig.conf - that's where you create the control group /etc/
  2. cgrules.conf - that's where you add binaries to that specific control group /etc/
  3. cgconf - that's the init script i use because its not available on ubuntu. It might be available for your OS in the package manager. I took the startup script from http://askubuntu.com/questions/836469/install-cgconfig-in-ubuntu-16-04 - /etc/init.d/

Notes

Use the following steps to test what you have without the

  • cgconfigparser -l /etc/cgconfig.conf - to add/register your control group to the system
  • cgrulesengd - sends the binary-cgroup binding rules.
@timnolte
timnolte / woocommerce_nonce.php
Last active August 6, 2020 02:10
WooCommerce Custom Fields with Custom Nonce and Validation
<?php
/**
* Create custom checkout field and nonce.
*
* @param WC_Checkout $checkout The checkout object.
*
* @return void
*/
function custom_checkout_field( $checkout ) {
@timnolte
timnolte / .vimrc
Created January 22, 2018 17:59 — forked from haringsrob/.vimrc
NeoVim as php IDE - Single file setup
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'martinda/Jenkinsfile-vim-syntax'
Plug 'c9s/phpunit.vim'
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'kien/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'StanAngeloff/php.vim'
@timnolte
timnolte / keybase.md
Last active December 22, 2017 05:17
keybase.md

Keybase proof

I hereby claim:

  • I am timnolte on github.
  • I am timnolte (https://keybase.io/timnolte) on keybase.
  • I have a public key ASC7t1EjuJFYCnk3L7qmPYTVlO9g_-JldwA4AIiWZwR_zgo

To claim this, I am signing this object: