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
@basecode
basecode / detect_special_characters.py
Created December 22, 2011 11:15
'no-break space' detection plugin for Sublime Text 2
# encoding: utf-8
import sublime, sublime_plugin
class DetectSpecialCharacters(sublime_plugin.EventListener):
def on_load(self, view):
sublime.status_message("detect_special_characters is active")
def on_modified(self, view):
# find no-break space
special_characters = view.find_all(u"\u00A0")
@umpirsky
umpirsky / A.markdown
Last active August 3, 2023 18:14 — forked from olivierlacan/An_example.markdown
Sublime Text Monokai Sidebar Theme.
@mlouro
mlouro / gulpfile.js
Last active June 21, 2022 23:20
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');
@tmoitie
tmoitie / gist:9808555
Last active April 18, 2024 18:56
Wordpress: Gravity Forms List to ACF Repeater post save
<?php
add_action('gform_after_submission', 'gfToAcfListToRepeater', 10, 2);
function gfToAcfListToRepeater($entry, $form)
{
foreach ($form['fields'] as $field) {
if (!($field['type'] == 'post_custom_field' && $field['inputType'] == 'list' && $field['enableColumns'] == true)) {
continue;
}
$id = $field['id'];
@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(
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:5175eea0b2538bd4b033
Created December 1, 2014 05:57
Outputting PHP variables to the browser console
<?php
echo "<script>console.log($post->ID)</script>";
?>
@spivurno
spivurno / gw-gravity-forms-change-field-id.js
Last active December 12, 2023 01:56
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-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.
*
@mkormendy
mkormendy / WordpressPluginSupportSearch
Last active May 26, 2016 02:41
Edit Search a Specific WordPress Plugin's Support Forums
site:wordpress.org/support/ "exact plugin name" keywords to search for
@mkormendy
mkormendy / whichfile.php
Last active January 21, 2016 05:32
Outputs the path of which php file is being called, at the top of that file, in HTML comments. Very useful for finding out which theme files and template parts are generating what part of the page.
<?php if (ENV == 'dev') { echo "<!-- ////////////////////////////////////////////////////////////////////////////////////////////\n".pathinfo( __FILE__ )['dirname']."/".pathinfo( __FILE__ )['basename']."\n"."///////////////////////////////////////////////////////////////////////////////////////////// -->\n"; } ?>