Skip to content

Instantly share code, notes, and snippets.

@rusuandreirobert
rusuandreirobert / example.php
Last active Dec 28, 2017
EDD - Bundle License to emulate the normal licenses.
View example.php
<?php
add_action( 'init', function() {
if( !isset( $_GET['edd_action'] ) && !isset( $_POST['edd_action'] ) )
return;
if( !isset( $_GET[ 'license' ] ) || !isset( $_GET[ 'item_id' ] ) )
if( !isset( $_POST[ 'license' ] ) || !isset( $_POST[ 'item_id' ] ) )
return;
@slushman
slushman / customizer-links.php
Last active Sep 29, 2020
How to link into the WordPress Customizer
View customizer-links.php
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@tomazzaman
tomazzaman / README.md
Last active Mar 18, 2020
Gulp workflow for WordPress theme development
View README.md

Gulp workflow for WordPress theme development

Requirements

In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php, just make sure to insert it only on development environment:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@rxnlabs
rxnlabs / php-wp-add-tinymce-button.php
Last active Feb 7, 2021
WordPress - Add button to TinyMCE editor in WordPress. Great for creating menus so users can add shortcodes without having to remember the syntax
View php-wp-add-tinymce-button.php
<?php
/*Add this code to your functions.php file of current theme OR plugin file if you're making a plugin*/
//add the button to the tinymce editor
add_action('media_buttons_context','add_my_tinymce_media_button');
function add_my_tinymce_media_button($context){
return $context.=__("
<a href=\"#TB_inline?width=480&inlineId=my_shortcode_popup&width=640&height=513\" class=\"button thickbox\" id=\"my_shortcode_popup_button\" title=\"Add My Shortcode\">Add My Shortcode</a>");
}
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Apr 14, 2021
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

View Three Wise Monkeys.md

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@malarkey
malarkey / Contract Killer 3.md
Last active Apr 16, 2021
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post