Skip to content

Instantly share code, notes, and snippets.

💻
Working away ...

Mike Kormendy mkormendy

💻
Working away ...
Block or report user

Report or block mkormendy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mkormendy
mkormendy / download-file-function.php
Last active Jul 25, 2019 — 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
<?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: https://d.pr/hCfNek and https://d.pr/MnerNb.
1. [custom_file_download("ftp://username:password@hostname.com/full/path/to/file.csv", "csv")]
2. [custom_file_download("http://example.com/full/path/to/file.csv", "csv")]
@mkormendy
mkormendy / zopim_defer.js
Created Jul 23, 2019 — forked from EdEichman/zopim_defer.js
Defer Loading Zopim until page is loaded (to avoid long load delay), based on article http://www.feedthebot.com/pagespeed/defer-loading-javascript.html
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=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?26Smu9lv0NXQEOOg8IAZrMPh9yQstAcV';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
//make sure zopim does not show till we know we have department agents
var intial_zopim_hiding_done = false;
@mkormendy
mkormendy / gw-gravity-forms-format-date-merge-tags.php
Last active May 31, 2019 — 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
<?php
/**
* Gravity Wiz // Gravity Forms // Add Formatting Options for Date Merge Tags
* http://gravitywiz.com/
*
* {Date:1:dmy} => 31/1/2017
* {Date:2:l} => Tuesday
*
* See PHP's date() function documentation for full details on formatting:
* http://php.net/manual/en/function.date.php
@mkormendy
mkormendy / activate-ethernet-airdrop.sh
Created Apr 7, 2019
Allow AirDrop to use Ethernet
View activate-ethernet-airdrop.sh
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
@mkormendy
mkormendy / NetworkManager.swift
Created Jan 28, 2019 — 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: "https://b2vapi.bmwgroup.com/webapi/oauth/token/")!)
request.addValue("Content-Type", forHTTPHeaderField: "application/json")
request.httpMethod = "GET"
let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: nil)
@mkormendy
mkormendy / teams-chat-post.sh
Created Dec 20, 2018 — forked from chusiang/teams-chat-post.sh
Post a message to Microsoft Teams with bash script.
View teams-chat-post.sh
#!/bin/sh
# =============================================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Filename: teams-chat-post.sh
# Modified: 2018-03-28 15:04
# Description: Post a message to Microsoft Teams.
# Reference:
#
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025
#
@mkormendy
mkormendy / devtools-validateAMP.bookmarklet
Last active Nov 7, 2018
Validate AMP Page with Chrome DevTools Bookmarklet
View devtools-validateAMP.bookmarklet
javascript:window.open(window.location.href+'#development=1','_self');
@mkormendy
mkormendy / my-first-module.md
Created Aug 28, 2018 — forked from tmpvar/my-first-module.md
how to create your very first node.js module and publish it to the npm registry
View my-first-module.md

building your first node module

This is pretty simple, lets dive in!

choose a name

Find a name that isn't taken and clearly describes what your module is doing

$ npm view your-first-node-module
@mkormendy
mkormendy / php_apache_homebrew.md
Created Jan 4, 2018 — forked from DragonBe/php_apache_homebrew.md
Installation of Apache 2.4 and PHP 7.1 with Homebrew
View php_apache_homebrew.md

I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.

The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.

I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.

Apache and PHP with homebrew

I’ve made this according to the installation instructions given on GetGrav.

You can’t perform that action at this time.