Skip to content

Instantly share code, notes, and snippets.

View sdenike's full-sized avatar

Shelby DeNike sdenike

View GitHub Profile
@sdenike
sdenike / gpg_git_signing.md
Created April 27, 2022 18:45 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@sdenike
sdenike / YouTube_TikTok.txt
Last active March 31, 2020 22:07
Block Youtube and Tiktok
(^|\.)googlevideo\.com$
(^|\.)m\.youtube\.com$
(^|\.)muscdn\.com$
(^|\.)musical\.ly$
(^|\.)s\.youtube\.com$
(^|\.)tiktok\.com$
(^|\.)www\.youtube\.com$
(^|\.)youtu\.be$
(^|\.)youtube-ui\.l\.google\.com$
(^|\.)youtube\.com$
@sdenike
sdenike / ubuntu-1804-lacp-bonding.md
Created February 23, 2020 21:47 — forked from PhilipSchmid/ubuntu-1804-lacp-bonding.md
Ubuntu 18.04 LACP Network Interface Bonding

Interface bonding

Configure an LACP active network interface bonding on Ubuntu 18.04 using netplan:

root@srv01:~# mv /etc/netplan/50-cloud-init.yaml /etc/netplan/01-netcfg.yaml
root@srv01:~# cat /etc/netplan/01-netcfg.yaml 
network:
    version: 2
    renderer: networkd
 ethernets:
@sdenike
sdenike / wp-config.php
Created February 20, 2020 19:55 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@sdenike
sdenike / 1-dnsmasq-dnscrypt-proxy-setup.md
Created December 6, 2019 19:19 — forked from irazasyed/1-dnsmasq-dnscrypt-proxy-setup.md
How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

Using Laravel Valet for localhost development, So it installs dnsmasq with it. dnsmasq runs on port 53, The default DNS port. So we setup dnscrypt-proxy on port 5300 with the default config files in this gist.

dnscrypt-proxy Installation

brew install dnscrypt-proxy
@sdenike
sdenike / GPG and git on macOS.md
Created September 20, 2018 23:31 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
Verifying myself: My Bitcoin username is +sdenike. https://onename.io/sdenike
@sdenike
sdenike / nginx+hhvm
Created April 24, 2014 22:12
ab for nginx+php-fpm and nginx+hhvm ... we have a winner.
root@ubuntu:/# ab -c 1000 -n 10000 http://localhost/misc/wp_dev/index.php
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@sdenike
sdenike / keybase.md
Created April 11, 2014 21:57
keybase.md

Keybase proof

I hereby claim:

  • I am sdenike on github.
  • I am sdenike (https://keybase.io/sdenike) on keybase.
  • I have a public key whose fingerprint is 1339 AE37 66EE 8779 47A5 6CB6 682F C1B9 5664 39BD

To claim this, I am signing this object:

#!/bin/bash
LOCKFILE=/tmp/.wb.lck
HOST=web01.fisys.us
BACKUPHOST=25.23.239.150
DOCROOT=/var/www
EXCLUDEDB='schema\|mysql'
EXCLUDE=.git
DATE=`date +%Y-%m-%d.%H%M`
#TIME=`time|grep real|awk '{print $2}'`
BACKUPFILE=/mnt/backup/$HOST.backup-$DATE.tar.bz2