This file contains hidden or 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
| name = Custom video helper | |
| description = Provides some custom hooks that help video uploads | |
| core = 7.x | |
| package = Media |
This file contains hidden or 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
| /** | |
| * function to remove billing fields from display if giftcard / coupon makes order total £0.00 | |
| */ | |
| $(document).ready(function(){ | |
| // on change due to ajax | |
| $( document ).ajaxComplete(function() { | |
| console.log( "Triggered ajaxComplete handler." ); | |
| var orderTotal = $('.page-checkout .view-id-commerce_cart_summary .field-name-commerce-order-total .component-type-commerce-price-formatted-amount .component-total').text(); | |
| if(orderTotal == '£0.00'){ | |
| console.log('Order total is zero (var: ' + orderTotal + ')'); |
This file contains hidden or 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 | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', TRUE); | |
| ini_set('display_startup_errors', TRUE); |
This file contains hidden or 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
| byzanz-record --duration=20 --delay=5 x=0 --y=0 --width=1024 --height=800 output.gif |
Ubuntu seems to have trouble talking to the Epson AL-M1200 printer. These instructions will get it working. Based on a set of instructions found here.
- Download epsoneplijs-0.4.1.tgz -file from here
cd Downloads(or whatever directory you downloaded the file to)tar zxvf epsoneplijs-0.4.1.tgzcd epsoneplijs-0.4.1./configure --prefix=/usrsudo make install- Download PPD file from here or here
- Connect your printer to your computer and turn it on. (You can do it in the beginning, but at least now you need it connected and powered on.)
This file contains hidden or 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 | |
| function isValidURL($url){ | |
| return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url); | |
| } | |
| // usage | |
| if(!isValidURL($url)){ | |
| $message = 'Please enter a valid URL'; | |
| echo $message; |
This file contains hidden or 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
| $(document).ready(function() { | |
| $("img").each(function () { | |
| var $this = $(this); | |
| var title = $this.attr("title"); | |
| $this.after('<div class="caption">'+ title +'</div>'); | |
| }); | |
| }); |
This file contains hidden or 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
| /* equal heights */ | |
| $.fn.setAllToMaxHeight = function(){ | |
| return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) ); | |
| } | |
| $(window).load(function() { | |
| $('#elementID, .elementClass').setAllToMaxHeight(); | |
| }); |
NewerOlder