Skip to content

Instantly share code, notes, and snippets.

View rohankhudedev's full-sized avatar

Rohan Khude rohankhudedev

View GitHub Profile
@rohankhudedev
rohankhudedev / opcache.ini
Last active February 29, 2024 03:41
Best Zend OpCache Settings / Tuning / Configurations
View opcache.ini
[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
Last active February 22, 2024 20:02
Laravel Server Requirements
View readme.md

Hardware Recommendations

8GB RAM
4 Core Processor
100GB HDD
OS - Latest CentOS

Software Recommendations

  • Make sure your server meets the following requirements:
@rohankhudedev
rohankhudedev / .htaccess
Last active July 4, 2023 01:26
Necessary Apache .htaccess Configuration: Performance and Security settings
View .htaccess
## ~-~-~- 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 / script.js
Created June 13, 2023 12:21
cell lat long for turf
View script.js
This file has been truncated, but you can view the full file.
$json = '[[{"lat":17.00537379223758,"lng":75.03474028272734},{"lat":16.906448552227882,"lng":74.93134923444453}],[{"lat":17.10429903224728,"lng":75.03474028272734},{"lat":17.00537379223758,"lng":74.93134923444453}],[{"lat":17.20322427225698,"lng":75.03474028272734},{"lat":17.10429903224728,"lng":74.93134923444453}],[{"lat":17.302149512266677,"lng":75.03474028272734},{"lat":17.20322427225698,"lng":74.93134923444453}],[{"lat":17.401074752276376,"lng":75.03474028272734},{"lat":17.302149512266677,"lng":74.93134923444453}],[{"lat":17.499999992286075,"lng":75.03474028272734},{"lat":17.401074752276376,"lng":74.93134923444453}],[{"lat":17.598925232295773,"lng":75.03474028272734},{"lat":17.499999992286075,"lng":74.93134923444453}],[{"lat":17.697850472305472,"lng":75.03474028272734},{"lat":17.598925232295773,"lng":74.93134923444453}],[{"lat":17.79677571231517,"lng":75.03474028272734},{"lat":17.697850472305472,"lng":74.93134923444453}],[{"lat":17.89570095232487,"lng":75.03474028272734},{"lat":17.79677571231517,"lng":74.
@rohankhudedev
rohankhudedev / readme.md
Last active February 3, 2023 07:30
How to create pipelines
View readme.md

Initial Step

  • Clone repository manually in the server. Use SSH URL to clone

Step 1 - Server

  • run this command ssh-keygen or ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
  • copy id_rsa.pub to authorized_keys by doing below
    • cd ~/.ssh/
  • cp id_rsa.pub authorized_keys
@rohankhudedev
rohankhudedev / wp-archive-state.php
Last active June 18, 2022 17:21
Wordpress Custom Post Status/State - Archive
View wp-archive-state.php
<?php
// Tested in WP Version - 5.9.3
// This file is part of functions.php
// Manipulate robots based on post status.
add_filter( 'wpseo_robots', 'yoast_seo_update_archive_robots_meta' );
function yoast_seo_update_archive_robots_meta( $robots ) {
if ( get_post_status() == 'archived') {
return 'noindex,nofollow';
} else {
View wasp.php
<style>
div,p{
display:inline; /*Added to avoid confusion in outpu*/
}
</style>
<form method="POST">
<textarea name="html_input" required ><?php echo !empty($_POST['html_input'])?$_POST['html_input']:'';?></textarea>
<input type="submit">
</form>
<?php
@rohankhudedev
rohankhudedev / rediffmail.js
Created May 5, 2021 11:27
Delete All Mails from Rediffmail Inbox
View rediffmail.js
// Simple steps to execute this
// 1. Login to rediffmail
// 2. Goto Inbox
// 3. Copy Below code and paste in console
```
function deleteAllMailsFromRediffMailInbox()
{
$('.rd_mail_sel_all').click();
@rohankhudedev
rohankhudedev / form.html
Last active October 6, 2020 18:02
submit form using simple ajax using post method
View form.html
<!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 / my_install.sh
Last active October 15, 2019 07:16
Install necessary packages using own shell script
View my_install.sh
#!/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