Skip to content

Instantly share code, notes, and snippets.

View rohankhudedev's full-sized avatar

Rohan Khude rohankhudedev

View GitHub Profile
@rohankhudedev
rohankhudedev / drupal-plugins.info
Last active April 9, 2018 09:34
Useful modules in every drupal projects
Date
Webform
Entity API
Libraries API
Views
Google Analytics
Backup and Migrate
Views Slideshow
Context
Media
@rohankhudedev
rohankhudedev / netbeans-plugins.md
Last active June 19, 2024 11:17
Most useful Netbeans Plugins

Darcula changes the colour scheme of the entire IDE, making it easier on the eyes when coding for long periods of time.

This simple plugin adds a customised toolbar to your IDE with all the most common Git commands on it, saving you time.

We have made our own NetBeans plugin, which can open PDFs in a JavaFX Viewer.

@rohankhudedev
rohankhudedev / .htaccess
Last active March 26, 2025 09:29
Necessary Apache .htaccess Configuration: Performance and Security settings
## ~-~-~- How to use ~-~-~-
# You can directly download as use as it is.
# Everything is listed is only perfomance and security related lines
# Validate .htaccess from http://www.htaccesscheck.com/
# Disable Directory Browsing: Security
Options All -Indexes
# If a dir is a symbol link, follow the link
@rohankhudedev
rohankhudedev / opcache.ini
Last active June 26, 2025 07:16
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@rohankhudedev
rohankhudedev / readme.md
Created February 16, 2018 17:48
Essential Social Media Meta Tags
<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />

<!-- Twitter Card data -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@publisher_handle"> <!--  Non-Essential, But Required for Analytics -->
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Page description less than 200 characters">
@rohankhudedev
rohankhudedev / laravel-compress-image.php
Created February 8, 2018 07:58
Laravel - compress image using tinypng API
//Get API KEY from https://tinypng.com/developers
try
{
\Tinify\setKey("W2zSUtK-Up2aS8Q6kQ-ndeHOL06SGHVz");
//TinyPNG Compress Image
$filepath = public_path('images/' . "knowledge-tribe.png");
$source = \Tinify\fromFile($filepath);
$source->toFile($filepath);
} catch( \Tinify\AccountException $e )
{
@rohankhudedev
rohankhudedev / my_install.sh
Last active October 15, 2019 07:16
Install necessary packages using own shell script
#!/bin/sh
#NOTE : update below links for package URL for all wget URL before proceed
#NOTE : Before running do `chmod +x my_install.sh` && sudo ./my_install.sh
# Update System
sudo apt-get -y update
sudo apt-get dist-upgrade -y
##attempt to correct a system with broken dependencies in place.
sudo apt-get -f install
@rohankhudedev
rohankhudedev / form.html
Last active October 6, 2020 18:02
submit form using simple ajax using post method
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).on('submit','form#smsform',function(e){
e.preventDefault();
@rohankhudedev
rohankhudedev / redirect_to_mobile_site.html
Last active March 16, 2017 17:50
Redirect desktop site to mobile site using javascript.
/*If you have two different sites, one for mobile and another for desktop. When any user try to visit your desktop site
from mobile, then use below code on your desktop website in index.html or import this below code as external JS.*/
// Add below code in your head tag
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
@rohankhudedev
rohankhudedev / global phone no.regex
Created February 7, 2017 06:16
regex for global to identify pattern for common phone number
i used regex which support varitey of global phone numbers
/^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/gm
Positive -
+42 555.123.4567
+1-(800)-123-4567
+7 555 1234567
+7(926)1234567