Skip to content

Instantly share code, notes, and snippets.

View rohankhudedev's full-sized avatar

Rohan Khude rohankhudedev

View GitHub Profile
@rohankhudedev
rohankhudedev / readme.md
Created October 16, 2024 14:39
How to update PDF Metas using exiftool
sudo apt update
sudo apt install libimage-exiftool-perl

#automatically creates backup
exiftool -Title="New Title" -Author="New Author" -Subject="New Subject" birlawhite-warranty-card.pdf

#overwrites original
exiftool -overwrite_original -Title="New Title" -Author="New Author" -Subject="New Subject" file.pdf
@rohankhudedev
rohankhudedev / script.js
Created June 13, 2023 12:21
cell lat long for turf
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

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
<?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 {
<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
// 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 / readme.md
Last active October 31, 2024 17:57
Laravel Server Requirements

Hardware Recommendations

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

Software Recommendations

  • Make sure your server meets the following requirements:
@rohankhudedev
rohankhudedev / multi-lingual-validation-msgs-formvalidator-net.js
Last active October 1, 2019 18:39
Multi Lingual form validation messages for http://www.formvalidator.net/. Note - validation messages commented in english is not being translated. Google translator used to translate validation messages
var english = {
errorTitle: 'Form submission failed!',
requiredFields: 'You have not answered all required fields',
requiredField: 'This field is required',
// badTime: 'You have not given a correct time',
badEmail: 'You have not given a correct e-mail address',
badTelephone: 'You have not given a correct phone number',
// badSecurityAnswer: 'You have not given a correct answer to the security question',
// badDate: 'You have not given a correct date',
lengthBadStart: 'The input value must be between ',
@rohankhudedev
rohankhudedev / readme.md
Last active February 25, 2019 12:56
host laravel in server without manipulating structure and without artisan
  • Before cloning project on server run below command. ref
$ umask 0022
  • Then clone your project
  • Run composer update ```$ composer update`
  • Give required permissions
$ chmod 0777 -R storage/
@rohankhudedev
rohankhudedev / indian-states-cities.json
Created September 5, 2018 10:25
Indian 36 states and 5741 cities and town in json format. Based on source https://github.com/hiiamrohit/Countries-States-Cities-database.
{"AN":["Bombuflat","Garacharma","Port Blair","Rangat"],"AP":["Addanki","Adivivaram","Adoni","Aganampudi","Ajjaram","Akividu","Akkarampalle","Akkayapalle","Akkireddipalem","Alampur","Amalapuram","Amudalavalasa","Amur","Anakapalle","Anantapur","Andole","Atmakur","Attili","Avanigadda","Badepalli","Badvel","Balapur","Bandarulanka","Banganapalle","Bapatla","Bapulapadu","Belampalli","Bestavaripeta","Betamcherla","Bhattiprolu","Bhimavaram","Bhimunipatnam","Bobbili","Bombuflat","Bommuru","Bugganipalle","Challapalle","Chandur","Chatakonda","Chemmumiahpet","Chidiga","Chilakaluripet","Chimakurthy","Chinagadila","Chinagantyada","Chinnachawk","Chintalavalasa","Chipurupalle","Chirala","Chittoor","Chodavaram","Choutuppal","Chunchupalle","Cuddapah","Cumbum","Darnakal","Dasnapur","Dauleshwaram","Dharmavaram","Dhone","Dommara Nandyal","Dowlaiswaram","East Godavari Dist.","Eddumailaram","Edulapuram","Ekambara kuppam","Eluru","Enikapadu","Fakirtakya","Farrukhnagar","Gaddiannaram","Gajapathinagaram","Gajularega","Gajuvaka","Ganna