Skip to content

Instantly share code, notes, and snippets.

View mkormendy's full-sized avatar
🛠️
Building, fixing, making a living

Mike Kormendy mkormendy

🛠️
Building, fixing, making a living
View GitHub Profile
@mkormendy
mkormendy / activate-ethernet-airdrop.sh
Created April 7, 2019 15:35
Allow AirDrop to use Ethernet
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
@mkormendy
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
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 December 20, 2018 21:08 — forked from chusiang/teams-chat-post.sh
Post a message to Microsoft Teams with bash script.
#!/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 November 7, 2018 04:48
Validate AMP Page with Chrome DevTools Bookmarklet
javascript:window.open(window.location.href+'#development=1','_self');
@mkormendy
mkormendy / my-first-module.md
Created August 28, 2018 18:55 — forked from tmpvar/my-first-module.md
how to create your very first node.js module and publish it to the npm registry

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 January 4, 2018 06:42 — forked from DragonBe/php_apache_homebrew.md
Installation of Apache 2.4 and PHP 7.1 with Homebrew

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.

@mkormendy
mkormendy / animated-star-expanding-lines.markdown
Created September 23, 2017 17:10
Animated Star Expanding Lines
@mkormendy
mkormendy / SassMeister-input.scss
Created September 23, 2017 16:37 — forked from mturjak/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$max: 100;
@for $i from 1 through $max / 2 {
$value: $i * 2 - 1;
.test_#{$value} { index: $i; value: $value; }
@mkormendy
mkormendy / SassMeister-input.scss
Created September 23, 2017 16:37 — forked from mturjak/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$max: 100;
@for $i from 1 through $max / 2 {
$value: $i * 2 - 1;
.test_#{$value} { index: $i; value: $value; }
@mkormendy
mkormendy / run_multiple_commands.py
Created July 3, 2017 23:21 — forked from bgmort/run_multiple_commands.py
Cleaned up version of code posted at https://forum.sublimetext.com/t/run-multiple-commands-command/6848/35. Added support for repeated commands and example key mappings to move/scroll by ten lines.
# run_multiple_commands.py
import sublime, sublime_plugin
# Takes an array of commands (same as those you'd provide to a key binding) with
# an optional context (defaults to view commands) & runs each command in order.
# Valid contexts are 'text', 'window', and 'app' for running a TextCommand,
# WindowCommands, or ApplicationCommand respectively.
class RunMultipleCommandsCommand(sublime_plugin.TextCommand):
def exec_command(self, command):
if not 'command' in command:
raise Exception('No command name provided.')