- this
- bind
- Hoisting
- Operator Precedence
- Lambda
- Object literals
- Prototypical inheritance vs. classical inheritance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Redirect to homepage after logout | |
* @version 0.1 | |
*/ | |
/* | |
Plugin Name: Redirect to homepage after logout | |
Plugin URI: http://daankortenbach.nl/wordpress/redirect-to-homepage-after-logout/ | |
Description: Redirects the user to the homepage after logout | |
Author: Daan Kortenbach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Determine if a post exists based on post_name and post_type | |
* | |
* @param $post_name string unique post name | |
* @param $post_type string post type (defaults to 'post') | |
*/ | |
function post_exists( $post_name, $post_type='post' ) { | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Callback for WordPress 'post_edit_form_tag' action. | |
* | |
* Append enctype - multipart/form-data and encoding - multipart/form-data | |
* to allow image uploads for post type 'post' | |
* | |
* @global type $post | |
* @return type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { | |
?> | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant box add raring-32 http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-i386-vagrant-disk1.box | |
vagrant init raring-32 | |
vagrant up | |
vagrant ssh | |
#sudo aptitude install php5-cli php5-dev php-pear imagemagick libmagickwand-dev libmagickcore-dev php5-imagick | |
#sudo pecl install imagick-beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request = require 'request' | |
Restzilla = require 'restzilla' | |
BUGZILLA_URL = 'https://www.w3.org/Bugs/Public/' | |
BURL = 'http://localhost:8000/AudioWG/MIDI%20API/' | |
GH_USER = 'jussi-kalliokoski' | |
GH_REPO = 'webmidi-issues' | |
GH_URL = 'https://api.github.com/repos/' + GH_USER + '/' + GH_REPO + '/issues' | |
GH_AUTH = | |
username: 'octocat' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl-z | |
bg | |
touch /tmp/stdout | |
touch /tmp/stderr | |
gdb -p $! | |
# In GDB | |
p dup2(open("/tmp/stdout", 1), 1) | |
p dup2(open("/tmp/stderr", 1), 2) |
OlderNewer