Skip to content

Instantly share code, notes, and snippets.

View devendrabhandari's full-sized avatar

Devendra Singh Bhandari devendrabhandari

View GitHub Profile
@devendrabhandari
devendrabhandari / gist:91b9fe80b0f7fd8c0440bf8f7f874ad5
Created January 24, 2020 16:19
Clear React Native Application Cache
Run the following command to clear bundle, generate new bundle. and then run the React Native Application in your Android device or Emulator.
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ && react-native run-android\
@devendrabhandari
devendrabhandari / cron-job
Last active June 28, 2018 16:11
GoDaddy - Create Cron Job
#Set cron job from cPanel. Two commands are avaliable to set the cron job:
1. /usr/local/bin/php -q /home/USERNAME/public_html/cron.php >/dev/null 2>&1
2. wget http://example.com/cron.php >/dev/null 2>&1
Also, you can generate the command from this website https://crontab-generator.org
@devendrabhandari
devendrabhandari / gist:f5d9a28d213c6b6d543a79b9ba6a0346
Last active June 24, 2018 04:43
Increase the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.
#Custom Fields Dropdown - WordPress Admin Dashboard
By default limit is 30 keys shown in the dropdown. If you want to increase the limit.
add_filter( 'postmeta_form_limit', 'meta_limit_increase' );
function meta_limit_increase( $limit ) {
return 300; // change it accordingly
}
Ref: https://developer.wordpress.org/reference/hooks/postmeta_form_limit/
@devendrabhandari
devendrabhandari / gist:a39ca29320da9aff1b540c38b8428e64
Last active June 23, 2018 01:05
React Native - Basic Util Functions
#React-Native: How to use common functions
1. Create a file 'validate.js'.
2. Add few function like this
export function isEmpty(str) {
return (!str || 0 === str.length);
}
export function validateEmail(email) {