Skip to content

Instantly share code, notes, and snippets.

View kdbaustert's full-sized avatar

Kenny Baustert kdbaustert

View GitHub Profile
@kdbaustert
kdbaustert / brew-instructions.sh
Created April 15, 2022 20:47 — forked from petemcw/brew-instructions.sh
Setup dnsmasq on Mac OS X
# Install `dnsmasq` and configure for *.test domains
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Reload configuration and clear cache
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ dscacheutil -flushcache
@kdbaustert
kdbaustert / 1-setup.md
Created January 29, 2022 17:45 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@kdbaustert
kdbaustert / install_ruby_with_rbenv.md
Created October 7, 2021 01:36 — forked from stonehippo/install_ruby_with_rbenv.md
Installing a new Ruby with rbenv on Mac OS

Install a new Ruby with rbenv on Mac OS (and make yourself a superhero)

If you're doing stuff with Ruby on a Mac, e.g. installling Jekyll or something, by default you'll end up having to use the sudo command to do stuff, since the permission to modify the default config is not available to your user account.

This sucks and should be avoided. Here's how to fix that.

Installing a new Ruby

To make this better, we are going install a new, custom Ruby. This used to be a big, scary thing, but thanks to the awesome tools Homebrew and rbenv, it's a snap.*

A word of warning: you will have to use Terminal to install this stuff. If you are uncomfortable with text, words, and doing stuff with your computer beyond pointing and hoping, this may not work well for you. But if that's the case, I'm not sure why you were trying to use Ruby in the first place.

@kdbaustert
kdbaustert / 01-generate-ed25519-ssh-key.sh
Created September 28, 2021 20:21 — forked from grenade/01-generate-ed25519-ssh-key.sh
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@kdbaustert
kdbaustert / nginx.conf
Created June 8, 2021 05:51 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@kdbaustert
kdbaustert / gw-gravity-forms-dynamic-select.php
Created May 17, 2021 18:55 — forked from spivurno/gw-gravity-forms-dynamic-select.php
Gravity Wiz // Gravity Forms // Dynamic Select (for Categories, Taxonomies and more)
<?php
/**
* Gravity Wiz // Gravity Forms // Dynamic Category Select
*
* Allows the user to drill down from a top level category to a child category.
*
* @version 1.0
* @author David Smith <[email protected]>
* @license GPL-2.0+
* @link http://gravitywiz.com/.../
@kdbaustert
kdbaustert / gw-gravity-forms-manual-notifications.php
Created May 17, 2021 18:54 — forked from spivurno/gw-gravity-forms-manual-notifications.php
Gravity Wiz // Gravity Forms // Send Manual Notifications
<?php
/**
* Gravity Wiz // Gravity Forms // Send Manual Notifications
*
* Provides a custom notification event that allows you to create notifications that can be sent
* manually (via Gravity Forms "Resend Notifications" feature).
*
* @version 1.2
* @author David Smith <[email protected]>
* @license GPL-2.0+
@kdbaustert
kdbaustert / gw-gravity-forms-manual-entries.php
Created May 17, 2021 18:54 — forked from spivurno/gw-gravity-forms-manual-entries.php
Gravity Wiz // Gravity Forms // Manual Entries
<?php
/**
* Gravity Wiz // Gravity Forms // Manual Entries
*
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages.
*
* @version 1.4
* @author David Smith <[email protected]>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
@kdbaustert
kdbaustert / macOS.sh
Created February 16, 2021 02:56 — forked from repodevs/macOS.sh
gpg: signing failed: Inappropriate ioctl for device macOS
❱ git config user.signingKey 38AF394C
❱ git config commit.gpgSign true
echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
@kdbaustert
kdbaustert / theme-helper.php
Created September 25, 2020 20:17 — forked from josanua/theme-helper.php
Theme Dev Helper
<?php
// General info
https://codex.wordpress.org/Theme_Development
// Theme Handbook
https://developer.wordpress.org/themes/
// Demo content an theme unit testing
https://codex.wordpress.org/Theme_Unit_Test