Create a Simple Reusable React Code Block

Code blocks are a nice addition to documentation but they don’t have to be complex. We can create a simple reusable code block in react. This component will use react hooks and have the following imports: import PropTypes from ‘prop-types’; import React, {useState} from ‘react’; import {CopyToClipboard} from ‘react-copy-to-clipboard’; import IconButton from ‘@material-ui/core/IconButton’; import CopyIcon […]

Android File Upload with WebView

I was working on a project called Neighbors Social Network, where the project called for for a progressive web app (PWA) to be integrated into an existing native iOS and Android app. Integration was as expected on both platforms: Create native web view for each platform. Direct the web views to the PWA’s url. An […]

Two Solutions to SFTP with PHP

Overview Recently I needed to syncfiles over sftpfor a Drupal plugin.I found two solutionsthat transferred the files as promised. SSH2 Since I was testing different methods, my installation notes are only for macOS. The PHP library needs libssh2, which can be install with brew. brew install libssh2 Now that the libssh2 library is available we […]

Using CakePHP Cache with Paginate

Overview I have a controller for rendering a sitemap.xml and in the case of this domain, itmight actually breach the 10MB size limit set by google. To gracefully handle the size limits for a sitemap, using paging seemed like the correct course of action. However, the sitemap was mostly static, changed infrequently and probably wasn’t […]

WordPress REST Api with CPT UI and ACF

By adding a little bit of code, you can make the fields you create with ACF available through the Wordpress API.

asp.net MVC Unit Tests with UserManager

When I started building out my unit tests, I did not want to mock my database for unit tests. The models were heavily connected and I wanted to make sure model integrity was being met. Creating a new datastore with SQLEXPRESS seemed like a better idea for this project. Do to this, I needed access […]

Powershell w/ Ssh Builtin

I’m not sure when it happened but Powershell has ssh builtin. You can literally run the same command that you would run on linux and macOS and you will be greeted with a session.

Sync Prod to Local Dev

Syncing with a production environment is something every developer should do regularly. These scripts will do the hard work so you can keep on developing, by syncing your MySQL database and files locally. SSH Private Key These scripts work best when you have your ssh keys setup on the server you want to sync. This […]

Awesome BBQ Chicken Bombs

This looks awesome and I must make these chicken bombs frequently. Thanks to  Justin P. BBQ Chicken Bombs 5 boneless skinless chicken breasts or 10 fillets 5 jalapeños, de-seeded, sliced in half lengthwise 4 ounces cream cheese, softened 1 cup cheddar cheese, shredded salt and pepper to taste 20 slices bacon 1 cup barbecue sauce […]

Handbrake DVD Rip Scrambled on macOS

Overview Do you need to record a dvd clip for commentary? Chances are you will use Handbrake since it is free, open source, and actively developed. Installation Since I am using macOS, I like to install HandBrake using brew. brew install handbrake DVD Recording Now that HandBrake is installed, insert your dvd and start recording! However, […]