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
#!/bin/bash | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git -y |
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
add_filter( 'woocommerce_get_order_item_totals', 'adjust_woocommerce_get_order_item_totals' ); | |
function adjust_woocommerce_get_order_item_totals( $totals ) { | |
unset($totals['cart_subtotal'] ); | |
return $totals; | |
} |
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
/* | |
* Replace all SVG images with inline SVG | |
*/ | |
jQuery('img.svg').each(function(){ | |
var $img = jQuery(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
jQuery.get(imgURL, function(data) { |
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
If you have a huge repository (in size and in history) and want to add a subfolder | |
to your project as a submodule you can follow this example to save time and space | |
using git's shallow clone and shallow checkout feature. It is a bit more complicated | |
in this example because I assume that you want your submodule to track a non-default | |
branch, called `mybranch`, instead of the `master` branch. Things could probably get | |
a lot simpler when using the default branch. After following the commands in these | |
examples you can use `git submodule update` and `git submodule update --remote` as normal. |
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
javascript:(function(){var style=document.createElement('style'),css=document.createTextNode('.refract-container .source{-moz-tab-size:4;tab-size:4;}');style.appendChild(css);document.getElementsByTagName('head')[0].appendChild(style);})(); |
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 | |
/** | |
* LoadElement | |
* | |
* Загрузка элементов из файлов | |
* | |
* @version 2.0.0 | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) | |
* @category plugin | |
* @author Agel Nash <modx@agel-nash.ru> |
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
export GIT_COMMITTER_DATE="Fri Jun 21 20:26:41 2013 +0900" | |
git commit --amend --date "Fri Jun 21 20:26:41 2013 +0900" -m 'fix committer_date and author_date' | |
unset GIT_COMMITTER_DATE | |
export GIT_COMMITTER_DATE="2013-08-01 23:01:01 +0900" | |
git commit --amend --date "2013-08-01 23:01:01 +0900" -m 'fix committer_date and author_date' | |
unset GIT_COMMITTER_DATE |
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
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox |