Skip to content

Instantly share code, notes, and snippets.

View tusharthe's full-sized avatar
🎯
Focusing

Tushar kanti tusharthe

🎯
Focusing
View GitHub Profile
<template>
<div class="tabs-component">
<ul class="tabs">
<li
v-for="(tab, index) in tabs"
:key="index"
:class="{ active: activeTab === index }"
>
<a @click="activateTab(index)">{{ tab }}</a>
</li>
<?php
if( !function_exists('mime_type_check') ){
function mime_type_check($path)
{
if( function_exists('mime_content_type') )
return mime_content_type($path);
else
return 'undefined/unknown';
}
@tusharthe
tusharthe / cordova-framework7Vue-backbutton.js
Last active April 15, 2020 12:15
framework7-vue cordova mobile application backbutton code
var self = this;
var firstPageUrl = window.location.href;
var exitApp = false, intval = setInterval(function (){exitApp = false;}, 1000);
var device = navigator.device;
document.addEventListener('backbutton', function (e) {
@tusharthe
tusharthe / Redirect-to-https-&-www-url-javascript.js
Created April 12, 2019 10:44
By copy paste this javascript script you can redirect website to https & www url
<script type="text/javascript">
if("https:"!=location.protocol){var locationhref="https:"+window.location.href.substring(window.location.protocol.length);window.location.replace(locationhref)}if("www."!=document.domain.substring(0,4).toLowerCase()){locationhref=document.URL.replace("//","//www.");window.location.replace(locationhref)}
</script>
create *.bat file
@echo off
php "D:\MY PHP\php practice\mySqli\Php Cronjob\run.php"
exit
craete sample *.php file
<?php
# find local IP
hostname -I
install nano
yum -y install nano
#update system
sudo yum update
#How to install Apache, PHP 7.2 and MySQL on CentOS 7 (LAMP)
@tusharthe
tusharthe / convert hindi kurtidev to unicode.php
Created October 25, 2018 18:15
convert hindi kurtidev to unicode: vice versa
<script type="text/javascript">
function convert_to_unicode(source,destination)
{
var array_one = new Array(
// "(",")",
"ñ","Q+Z","sas","aa",")Z","ZZ","‘","’","“","”",
"å", "ƒ", "„", "…", "†", "‡", "ˆ", "‰", "Š", "‹",
$alredy = false;
if(filesize('myjson.json') > 0) {
$alredy_data = file_get_contents('myjson.json');
$alredy_data = json_decode($alredy_data);
//print_r($alredy_data);die();
foreach($alredy_data as $value)
{
$url22 = $value->url;
@tusharthe
tusharthe / tblcitylist.sql
Created July 28, 2018 16:47 — forked from sivaprabug/tblcitylist.sql
MySQL database of Indian Cities and states,latitude and longitude..
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2013 at 02:48 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
function validate_data($data)
{
global $conn;
$data = trim($data);
$data = stripslashes($data);
$data = strip_tags($data);
$data = htmlspecialchars($data);
$data = mysqli_real_escape_string($conn,$data);
return $data;
}