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 | |
Vc_Manager::getInstance()->vc()->addShortcodesCustomCss($page_id); | |
$the_post = get_post($page_id); | |
echo apply_filters('the_content', $the_post->post_content); | |
?> |
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 special_nav_class ($classes, $item) { | |
if (in_array('current-menu-item', $classes) ){ | |
$classes[] = 'active '; | |
} | |
return $classes; | |
} |
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
// lock scroll position, but retain settings for later | |
var scrollPosition = [ | |
self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, | |
self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop | |
]; | |
var html = jQuery('html'); // it would make more sense to apply this to body, but IE7 won't have that | |
html.data('scroll-position', scrollPosition); | |
html.data('previous-overflow', html.css('overflow')); | |
html.css('overflow', 'hidden'); | |
window.scrollTo(scrollPosition[0], scrollPosition[1]); |
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
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
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
du -sh /var/cache/apt/archives | |
//clean the apt cache | |
sudo apt-get clean | |
//way to remove old kernels in Ubuntu | |
sudo apt-get autoremove --purge | |
//To remove a specific app by name | |
sudo apt-get remove package-name1 package-name2 | |
//packages and dependencies which are newer versions have replaced them | |
sudo apt-get autoremove |
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
sudo add-apt-repository -y -r ppa:chris-lea/node.js | |
sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list |
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 getIndianCurrency(float $number) | |
{ | |
$decimal = round($number - ($no = floor($number)), 2) * 100; | |
$hundred = null; | |
$digits_length = strlen($no); | |
$i = 0; | |
$str = array(); | |
$words = array(0 => '', 1 => 'one', 2 => 'two', | |
3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six', | |
7 => 'seven', 8 => 'eight', 9 => 'nine', |
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
dd@32@ata |
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
sudo npm install npm@latest -g |
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
sudo fuser -vki /var/lib/dpkg/lock | |
sudo fuser -vki /var/cache/apt/archives/lock | |
sudo fuser -vki /var/cache/debconf/config.dat | |
sudo dpkg --configure -a |