Skip to content

Instantly share code, notes, and snippets.

View Rameshwar-ghodke's full-sized avatar
💭
working as Web Designer

Rameshwar ghodke Rameshwar-ghodke

💭
working as Web Designer
View GitHub Profile
@Rameshwar-ghodke
Rameshwar-ghodke / Disable Copy and Paste contents or Keys
Created January 8, 2021 10:32
you can keep your content secure from visitors to copy and paste.
<script type="text/javascript">
$(document).ready(function () {
//to disable the entire page
$('body').bind('cut copy paste', function (e) {
e.preventDefault();
});
//to disable a section
$('#id').bind('cut copy paste', function (e) {
e.preventDefault();
First, use the following jQuery library:
<script src=”jquery.min.js”></script>
Then, add the following codes:
<script type="text/javascript">
$(document).ready(function () {
//to disable the entire page
$("body").on("contextmenu",function(e){
return false;
@Rameshwar-ghodke
Rameshwar-ghodke / count down days script
Created January 7, 2021 05:09
Display number of count days , it will automatic reduce one by one days
<span class="count_days" id='remain_days'> </span>
<script>
var countDownDate = new Date("Feb 15, 2021").getTime();
var x = setInterval(function() {
var now = new Date().getTime();
var distance = countDownDate - now;
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
Open CMD promt and goes into - cd xamp\mysql\bin
// Use below cmds for perform operation.
mysql -uroot - connect db
use DBNAME; - enter into curent db
source FILEPATH with extension; - attach dg path
@Rameshwar-ghodke
Rameshwar-ghodke / Custom Choose Files form field with button type look
Last active December 17, 2020 04:23
change input type file like button type
/* ******** Custom Choose Files form field with button type look ************ */
// CSS code
.custom-file-upload { border: 1px solid #d7131c; display: inline-block; padding: 6px 12px; cursor: pointer; color:#d7131c; }
input[type="file"] { display: none; }
//Html Code
<div class=""><label class="custom-file-upload btn btn-outline-danger btn-block">
<input type="file">
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Example of bootstrap tooltip on top</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function(){
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Example of bootstrap tooltip on top</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function(){
@Rameshwar-ghodke
Rameshwar-ghodke / Captcha code
Created October 6, 2020 11:08
Add Captcha code in form Bootstrap or using html
<div class='col-md-12 col-sm-12 form-group mb-2 mx-auto'>
<div class="g-recaptcha" data-sitekey="6LfKURIUAAAAAO50vlwWZkyK_G2ywqE52NU7YO0S" data-callback="verifyRecaptchaCallback" data-expired-callback="expiredRecaptchaCallback"></div>
<input class="form-control d-none" data-recaptcha="true" required data-error="Please complete the Captcha">
<div class="help-block with-errors"></div>
</div>
<script src='https://www.google.com/recaptcha/api.js'></script>
@Rameshwar-ghodke
Rameshwar-ghodke / Scroll back to Top of the Page Button using Javascript
Created September 21, 2020 05:00
Scroll back to Top of the Page Button using Javascript
// HTML
===========================
<a id="back2Top" title="Back to top" href="#">&#10148;</a>
// CSS
===========================
#back2Top {
width: 40px;
line-height: 40px;
overflow: hidden;
@Rameshwar-ghodke
Rameshwar-ghodke / Translate website in marathi add script
Created September 17, 2020 05:27
translate webpage by adding google script code in website
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{pageLanguage: 'en'},
'google_translate_element'
);
}
</script>