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 / click_allow.scpt
Last active November 30, 2015 16:07 — forked from T4erg/README
These two files should help you to export passwords from mac OS X keychains
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
tell process "SecurityAgent"
click button "Allow" of window 1
end tell
delay 0.2
end repeat
end tell
@mkormendy
mkormendy / mac-amp.sh
Last active April 7, 2017 03:32 — forked from bramus/gist:5b4f4733e543912a518f
OS X 10.12 Sierra, Apache, MySQL, PHP 5.6, (MAMP) Homebrew Dev Setup
# From http://www.iyware.com/osx-yosemite-mamp-homebrew-development-setup/
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
# Tap Repos
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
@mkormendy
mkormendy / react.sh
Last active October 23, 2015 19:35 — forked from mikesmullin/watch.sh
react is a linux bash script to monitor file modification recursively and execute bash commands as changes occur
#!/usr/bin/env bash
# script: react (renamed from conflicting 'watch' command)
# author: Mike Smullin <[email protected]>
# contributor: Mike Kormendy <[email protected]>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
@mkormendy
mkormendy / Gulpfile.js
Created October 1, 2015 03:31 — forked from DESIGNfromWITHIN/Gulpfile.js
Gulpfile.js example Uses browser-sync, node-neat, gulp and gulp-sass
/*
Gulpfile.js file for the tutorial:
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev
Steps:
1. Install gulp globally:
npm install --global gulp
@mkormendy
mkormendy / gulpfile.js
Created September 30, 2015 22:54 — forked from mlouro/gulpfile.js
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@mkormendy
mkormendy / WPUserTableCleanUp.sql
Last active August 29, 2015 14:26 — forked from webaware/gist:d1b51f68977d32603491
Clean up the mess left in WordPress users tables by WP e-Commerce, after you've removed that plugin from WordPress.
delete from u, um
using wp_users u
left join wp_usermeta um on um.user_id = u.ID
where u.user_login like '\_%'
-- delete any usermeta specific to the other subsites
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_';
-- duplicate the wp_usermeta structure in a working data table,
-- but add a unique index for filtering out duplicates
create table _fix_usermeta like wp_usermeta;
alter table _fix_usermeta add unique(user_id, meta_key);
-- copy the site-specific usermeta, keeping only the last of each duplicate
insert into _fix_usermeta
@mkormendy
mkormendy / gulpfile.js
Last active August 29, 2015 14:10 — forked from barnaby/gulpfile.js
var gulp = require('gulp'),
takana = require('takana');
gulp.task('takana', function() {
takana.run({
path: __dirname,
includePaths: [] // Optional
});
});
tell application "System Events"
-- get current clipboard contents as a string
set CurrentClipboard to the clipboard as string
-- set the clipboad to your password
set the clipboard to "Y0urVPNPa$$w0rd"
-- start playing with the VPN
tell current location of network preferences
@mkormendy
mkormendy / gist:bf644c9c64ad10df2b9e
Last active January 21, 2016 05:40 — forked from billerickson/gist:3698476
Wordpress Query Comprehensive Reference (forked)
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(