Skip to content

Instantly share code, notes, and snippets.

View vishnusomanus's full-sized avatar

Vishnu Soman U S vishnusomanus

View GitHub Profile
@media (max-width: 992px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
function GetURLParameter(sParam,sPageURL){
//var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam)
{
return sParameterName[1];
function resizeCol(element) {
var maxHeight = 0;
jQuery(element).css("height","auto");
jQuery(element).each(function(){
if (jQuery(this).height() > maxHeight) { maxHeight = jQuery(this).height(); }
});
//console.log(maxHeight);
jQuery(element).height(maxHeight);
}
function add_meta_boxes() {
add_meta_box(
'wpa-45985',
'Extra Options',
'wpa_meta_box_display',
'dzsrst_items',
'normal',
'high');
function dt_change_default_sidebar() {
global $DT_META_BOXES;
if ( $DT_META_BOXES ) {
if ( isset($DT_META_BOXES[ 'dt_page_box-sidebar' ]) ) {
$DT_META_BOXES[ 'dt_page_box-sidebar' ]['fields'][0]['std'] = 'disabled';
}
}
}
add_action( 'admin_init', 'dt_change_default_sidebar', 20);
Main.php
..................................................................
<?php
class Main
{
mongo.php
..................................................
<?php
/**
git init
git branch
git checkout master
git reset
git checkout -b development
git status
git add .
git commit -m ""
function.php
........................................................
function upload_user_file( $file = array() ) {
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
$file_return = wp_handle_upload( $file, array('test_form' => false ) );
if( isset( $file_return['error'] ) || isset( $file_return['upload_error_handler'] ) ) {
return false;
} else {
sudo nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName sme.dev
ServerAlias www.sme.dev
DocumentRoot /var/www/html/vishnu/sme
ErrorLog ${APACHE_LOG_DIR}/error.log