Skip to content

Instantly share code, notes, and snippets.

Matt Patterson mattpatterson94

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mattpatterson94 on github.
  • I am mattpatterson94 (https://keybase.io/mattpatterson94) on keybase.
  • I have a public key ASCKXf9Ev6L8JWcPt8eFPhy02i-kzHMzQl78SQv6E2EjiQo

To claim this, I am signing this object:

@mattpatterson94
mattpatterson94 / plex-media-server-raspberry-pi-setup.md
Last active Sep 10, 2018
Setting up Plex Media Server on Raspberry Pi (with NTFS automounting)
View plex-media-server-raspberry-pi-setup.md
  1. Get the latest version of Raspbian LITE
  2. Download Etcher and install.
  3. Run etcher to burn raspbian onto your SD Card
  4. Place a file named ssh on the boot directory (you can mount the boot directory in disk utility)
  5. Place the SD card into the pi and boot.
  6. Run sudo raspi-config to set up basic initial config.
  7. Upgrade Raspbian
sudo apt-get update
View woocommerce-input-class.php
<?php
function lv2_add_bulma_input_classes( $args, $key, $value = null ) {
// Include in functions.php
/* This is not meant to be here, but it serves as a reference
of what is possible to be changed.
$defaults = array(
'type' => 'text',
'label' => '',
View server_setup.md

Set up server for Wordpress

Part 1: Initial Configuration

1. Create new 1GB Digital Ocean Box with Backups enabled.

2. Generate two passwords. One will be used for new user and one for mysql root.

3. Paste Server details and passwords into the spreadsheet

4. ssh into server

5. Create new user deployer. Use one of the passwords generated in step 2.

@mattpatterson94
mattpatterson94 / nginx.conf
Last active Feb 4, 2018
NGINX Config with SSL Template
View nginx.conf
# NGINX CONFIG W/ SSL TEMPLATE
#dev/wordpress #dev/snippets #dev/server
```
server {
listen 80;
listen [::]:80;
server_name www.example.com;
return 301 https://$host$request_uri;
}
View certbot_cron.md

CERTBOT RENEW CERTIFICATE CRON

#dev/server #dev/snippets

touch cron_log.log
touch renew-certs
chmod 777 renew-certs

Crontab

View certbot.md

SET UP CERTBOT

#dev/server #dev/scripts

This is the setup guide for Certbot on Ubuntu 16.04 NGINX

https://certbot.eff.org/#ubuntuxenial-nginx

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
@mattpatterson94
mattpatterson94 / woocommerce-input-class.php
Last active Sep 3, 2017
Woocommerce Bulma Form inputs
View woocommerce-input-class.php
<?php
function lv2_add_bootstrap_input_classes( $args, $key, $value = null ) {
/* This is not meant to be here, but it serves as a reference
of what is possible to be changed.
$defaults = array(
'type' => 'text',
'label' => '',
'description' => '',
@mattpatterson94
mattpatterson94 / README.md
Last active Feb 28, 2017
Cloning a repository by setting upstream and rebasing into master.
View README.md

This is experimental. Methodology is questionable. Any feedback is welcome.

  • Take a parent repository git@github.com:Example/example.git
  • Take a child repository git@github.com:Example/child.git
cd child;
git checkout master;
git remote add upstream git@github.com:Example/example.git;
git checkout -b parent;
@mattpatterson94
mattpatterson94 / Gemfile
Last active Mar 29, 2016
Simple test configuration for RSpec in Rails
View Gemfile
group :test do
gem 'simplecov', require: false
gem 'factory_girl_rails'
gem 'faker'
gem 'pry-rails'
gem 'pry-rescue'
gem 'database_cleaner'
gem 'capybara'
gem 'capybara-screenshot'
end
You can’t perform that action at this time.