Skip to content

Instantly share code, notes, and snippets.

Building, fixing, making a living

Mike Kormendy mkormendy

Building, fixing, making a living
View GitHub Profile
mkormendy /
Created March 1, 2021 07:20
UniFi Network Controller Setup for MacOS with Homebrew
brew tap homebrew/cask-drivers
brew install --cask homebrew/cask-versions/adoptopenjdk8
brew install --cask ubiquiti-unifi-controller
mkormendy / gw-gravity-forms-change-field-id.js
Created December 3, 2020 21:23 — forked from spivurno/gw-gravity-forms-change-field-id.js
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
View gw-gravity-forms-change-field-id.js
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page.
* @version 1.0
* @author David Smith <>
* @license GPL-2.0+
* @link
* @video
mkormendy /
Last active September 22, 2020 03:27 — forked from julianxhokaxhiu/
Recursively optimize all PNG and JPG files from the location of the script.
find /uploads/sites/*/20* -type f -iname "*.png" -exec pngquant --speed 1 --skip-if-larger --strip {} \;
find /uploads/sites/*/20* -type f -iname "*.png" -exec advpng -z4 {} \;
find /uploads/sites/*/20* -type f -iregex .*\.jpe?g$ -exec jpegoptim -f -s -v -m 50 {} \;
touch optimg.flag
# find's -newer command option compares the timestamps of files found against a defined file, in our case optimg.flag
# when we finish optimizing all of the images we touch the optimg.flag file to update its timestamp
mkormendy / manual-gravity-forms
Created April 29, 2020 00:41 — forked from keithdevon/manual-gravity-forms
Manually create entries and send notifications with Gravity Forms
View manual-gravity-forms
// Manually create entries and send notifications with Gravity Forms
$form_id = 10;
// add entry
$entry = array(
"form_id" => $form_id,
"1" => "Entry for field ID 1",
mkormendy / download-file-function.php
Last active July 25, 2019 02:34 — forked from trey8611/download-file-function.php
Used to workaround WP All Import's inability to support curl Auth properly
View download-file-function.php
################### READ ME #################################
You'll pass the URL to your feed/file to this function inside the "Download from URL" option when creating an import.
Image examples: and
1. [custom_file_download("", "csv")]
2. [custom_file_download("", "csv")]
mkormendy / zopim_defer.js
Created July 23, 2019 23:36 — forked from EdEichman/zopim_defer.js
Defer Loading Zopim until page is loaded (to avoid long load delay), based on article
View zopim_defer.js
//basic zopim widget code, from their site
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
$.src='//';z.t=+new Date;$.
//make sure zopim does not show till we know we have department agents
var intial_zopim_hiding_done = false;
mkormendy / gw-gravity-forms-format-date-merge-tags.php
Last active May 31, 2019 15:55 — forked from spivurno/gw-gravity-forms-format-date-merge-tags.php
Gravity Wiz // Gravity Forms // Add Formatting Options for Date Merge Tags
View gw-gravity-forms-format-date-merge-tags.php
* Gravity Wiz // Gravity Forms // Add Formatting Options for Date Merge Tags
* {Date:1:dmy} => 31/1/2017
* {Date:2:l} => Tuesday
* See PHP's date() function documentation for full details on formatting:
mkormendy /
Created April 7, 2019 15:35
Allow AirDrop to use Ethernet
defaults write BrowseAllInterfaces -bool true
mkormendy / NetworkManager.swift
Created January 28, 2019 06:35 — forked from ronaldmannak/NetworkManager.swift
Proof of concept for Connecting to the BMW Connect server using SSL certificate pinning. Assumes you have copied GlobalSignOrganizationValidationCA-SHA256-G2.cer from the Connected Drive iOS app bundle
View NetworkManager.swift
import Foundation
final class NetworkManager: NSObject, URLSessionDelegate {
func login() {
var request = URLRequest(url: URL(string: "")!)
request.addValue("Content-Type", forHTTPHeaderField: "application/json")
request.httpMethod = "GET"
let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: nil)