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 | |
class foobar_shortcode { | |
static $add_script; | |
static function init () { | |
add_shortcode('foobar', array(__CLASS__, 'foobar_func')); | |
add_action('init', array(__CLASS__, 'register_script')); | |
add_action('wp_footer', array(__CLASS__, 'print_script')); | |
} | |
static function foobar_func( $atts ) { | |
self::$add_script = true; |
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
jQuery(function($) { | |
$('.timer').countTo({ | |
from: 0, | |
to: 4.89, | |
speed: 4000, | |
refreshInterval: 1, | |
onComplete: function(value) { | |
console.debug(this); | |
} | |
}); |
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 | |
switch($_GET['clean']) { | |
case 'log': | |
clean_log_tables(); | |
break; | |
case 'var': | |
clean_var_directory(); | |
break; | |
} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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 | |
/** | |
* Клас для обработки видео ссылок и генерации HTML видео. | |
* User: Alex | |
* Date: 24.09.2014 | |
* Time: 17:32 | |
*/ | |
class wpc_media | |
{ |
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
gpg --keyserver pgpkeys.mit.edu --recv-key 010908312D230C5F | |
gpg -a --export 010908312D230C5F | sudo apt-key add - |
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
sudo apt install msttcorefonts | |
sudo fc-cache -fv |
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 | |
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter('woocommerce_default_catalog_orderby', 'imperialfashion_custom_default_catalog_orderby'); | |
function imperialfashion_custom_default_catalog_orderby() { | |
return 'date'; // Can also use title and price | |
} |
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
# Install latest node | |
# for Node.js v4 | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
# OR for Node.js v5 | |
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
# OR for Node.js v6 | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install nodejs | |
# it will install npm to |
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
postdrop: warning: mail_queue_enter: create file maildrop/327454.25698: No space left on device | |
find dir_name/ -type f -name "*" -exec rm -f {} \; - #wery slow for many files | |
find session/ -type f -delete; #will perform better because it doesn't have to spawn an external process for each and every matched file. |
OlderNewer