Posts

React Native / Expo Environment Setup on Ubuntu

1. Install Node.js Install Node.js from the official website using curl . Example: curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs Verify installation: node -v npm -v 2. Install npm (if not installed) sudo apt install npm 3. Install Java (OpenJDK 17) React Native requires Java for Android development. sudo apt-get install openjdk-17-jdk sudo apt-get install openjdk-17-jre Verify: java -version 4. Install Watchman Watchman helps detect file changes for React Native projects. sudo apt install watchman Verify: watchman --version 5. Install Android Studio Download Android Studio. Extract it into the root directory / . Example: sudo tar -xvf android-studio-*.tar.gz -C / Navigate to the bin folder : cd /android-studio/bin Run Android Studio: ./studio.sh Complete the Android SDK setup from the Android Studio wizard. 6. Configure Android Environment Variables Open the .bashrc file: gedit ~/.bashrc Add the following lines at the end of the file : ex...

changes into code

sudo apt install poppler-utils pandoc unoconv ocrmypdf libreoffice ===================== sudo chown -R www-data:www-data /var/www/html/merger/ sudo chmod -R 755 /var/www/html/merger/ sudo chmod -R 777 /var/www/html/merger/uploads/ sudo chmod -R 777 /var/www/html/merger/merged/ sudo chmod -R 777 /var/www/html/merger/temp/

wordpress plugin boilerplate

  Ideal Folder Structure (Industry-standard) log -manager/ │ ├── log -manager.php (Main plugin file) │ ├── includes/ │ ├── class - log -manager.php │ ├── class - log -manager- admin .php │ ├── class - log -manager-logger.php │ └── class - log -manager-db.php │ ├── assets/ │ ├── css/ │ └── js/ │ └── uninstall.php 1️⃣ Main Plugin File ( log-manager.php ) 👉 ONLY bootstraps the plugin <?php /** * Plugin Name: Log Manager * Description: WordPress Log Manager Plugin * Version: 1.0.0 */ if (! defined ( 'ABSPATH' )) exit ; define ( 'LM_PATH' , plugin_dir_path ( __FILE__ )); define ( 'LM_URL' , plugin_dir_url ( __FILE__ )); require_once LM_PATH . 'includes/class-log-manager.php' ; function run_log_manager ( ) { $plugin = new Log_Manager (); $plugin -> run (); } run_log_manager (); 2️⃣ Core Plugin Class ( class-log-manager.php ) 👉 Controls everything <?php class Log_Manager { public functio...

graphql mutation in wpgraphql

 mutation MyMutation {   registerUser(     input: {username: "abacus", email: "abacus@gmail.com", password: "abacus123", firstName: "abacusjames", lastName: "nito"}   ) {     user {       auth {         authToken         refreshToken         authTokenExpiration         refreshTokenExpiration       }       id       email       roles {         nodes {           name         }       }     }   } } =========================================== contact form 7 submission with rate limiter ===>  add_action('rest_api_init', function () {     register_rest_route('wp/v2', '/cf7/submit', array(         'methods'  => 'POST',         'callback' => 'mcbot_...

Donation

Image
 Hi user! If you appriciate my work , then you can send me welcome gift!  Meme template https://drive.google.com/drive/folders/11tu9TcU9_fxWI9h-2zKvXUux9yiH8rlz as  now, in india , we only focuses on UPI payment! If you have any quqery! then whatsapp me: 9330497982 if you want to donate me via Google Pay or any UPI App then scan the below link and payout to me!

STRAPI

Image
  Strapi helps us to provide pre-made cms backend. In strapi everything is about content type.   Topic: Weird Things About STRAPI Topic: Document Save States When we want to store a post into strapi, that time it gives us 2 options: “publish”, “save”. When we create content as publish/save it creates 2 different records. First 2 are for “save” and the rest 2 are for “publish”. Good thing is when creating a new publish/save it delta the OLD one ID and create a NEW one. Topic: Content Type change in strapi We can add multiple fields into strapi content type. For changing the Column Type we need go in inside /src/your-content-type/schema.json /* OLD ONE */ "attributes": {     "title": {       "type": "string"     },     "description": {       "type": "text",   "length": 80     }, /* NEW ONE */ "description": {    ...

LAMP stack install linux

step 1: sudo apt install apache2  step 2:  sudo apt install mysql-server -y sudo mysql > CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost'; FLUSH PRIVILEGES; ********** OLD PROCESS ****************** mysql: SHOW VARIABLES LIKE 'validate_password';  mysql: USE mysql;  mysql: ALTER USER 'root@'localhost' IDENTIFIED WITH caching_sha2_password BY 'your_password_for_mysql_root_user';  mysql: FLUSH PRIVILEGES;  mysql: exit  STEP 3:  sudo apt install php php-mysql php-gd libapache2-mod-php  STEP 4:  sudo apt install nano phpmyadmin configure phpmyadmin after installation  sudo nano /etc/apache2/apache2.conf add this line somewhere Include /etc/phpmyadmin/apache.conf and finally restart apache. sudo service apache2 restart STEP 5: set the var/www/html access ## set proper permission into your wordpress project sudo chown -R $USER:www-data /var/www sudo chmod...