React native image picker – ios fix

In ios response.uri won’t work for file uploads. Modify it as below (Platform.OS===’android’) ? response.uri : response.uri.replace(‘file://’, ”) and in options storageOptions: { skipBackup: true, path: ‘images’,...

React native xcode – Common Commands

How can I launch the iOS Simulator from Terminal? Just use open -a simulator For some specific device 1. open terminal 2. xcrun simctl list 3. get udid of the device you want to launch 4. Paste this in the terminal 5. open -a Simulator –args -CurrentDeviceUDID...

How to import external images in WordPress

We usually run into this issue while migrating site from one domain to another or during migration from wordpress.com to wordpress.org There are couple of plugins which you use to import external images. One of the popular one is...

perl: warning: Setting locale failed

A weird issue encountered while trying to run laravel’s php artisan commands while logged in using SSH. Following was the error. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset),...

Convert stdclass object to array in PHP

Convert object to array in PHP $new_array = objectToArray($yourObject); function objectToArray($d) { if (is_object($d)) { // Gets the properties of the given object // with get_object_vars function $d = get_object_vars($d); } if (is_array($d)) { /* * Return array...