Posts

Laravel Stuffs

Create project with composer: composer create-project laravel/laravel example-app To run with IP address for Mobile app development: php artisan serve --host 0.0.0.0 --port 8000  To migrate: php artisan migrate Sqlite: touch database/database.sqlite User absolute path for sqlite: DB_CONNECTION=sqlite  DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=/media/than/8d3a469e-9421-470b-842e-26012f02dd47/than/dev_laravel/example-app/database/database.sqlite DB_USERNAME=root DB_PASSWORD= Reference:   https://laravel.com/docs/9.x/installation

JAVA_HOME setup and Integrate with Android Studio Project in Ubuntu

 $ whereis jvm      jvm: /usr/lib/jvm $ nano .bashrc Write :      JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64      export JAVA_HOME      PATH=$PATH:$JAVA_HOME/bin      export PATH Close Terminal and Re-open Terminal: $ echo $JAVA_HOME      /usr/lib/jvm/java-11-openjdk-amd64 Reference :  https://youtu.be/106uH7USwZ8 In Android Studio: Fire->Project Structure -> Need to update in SDK Location and Modules sections to java-11 Reference:  https://youtu.be/lv-jE2d4Aoc

Generate SHA-1 and SHA-256 for Debug and Release android app

Go to the Root directory of the project and generate on Terminal. Debug SHA-1 and SHA-256:      keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android Release SHA-1 and SHA-256: keytool -list -v -keystore /home/than/flutterProjects/PlayStoreKeystore/farm_to_retail.jks - alias key0

Ubuntu running slow? Check your CPU settings!

 https://thelinuxuser.com/ubuntu-running-slow/

Django Migration Problem Solution

* Delete table manually from DB * Delete migration file in migrations folder * User following example commands:         - python manage.py makemigrations         -  python manage.py migrate --fake core 0038_auto_20211003_2229         -  python manage.py migrate core 0039_customerbkashpayment (Note: 0039_customerbkashpayment is the recently migration file. 'core' is app name. 0038_auto_20211003_2229 is the previous on issue migrated file.)

Git Command line instructions (Git Lab)

Git Command line instructions Git global setup: git config --global user.name "Than Aung Kyow" git config --global user.email "thanaungkyow3@gmail.com" Create a new repository: git clone https://............directory.git cd directory git switch -c main touch README.md git add README.md git commit -m "add README" git push -u origin main Push an existing folder: cd existing_folder git init --initial-branch=main git remote add origin https://...........git git add . git commit -m "Initial commit" git push -u origin main Push an existing Git repository: cd existing_repo git remote rename origin old-origin git remote add origin https://.............git git push -u origin --all Fore to push: git push --force origin master If you really want to remove all of the repository, leaving only the working directory then it should be as simple as this. rm -rf .git  
  CKEditor 5  Math equations and chemical formulas (ReactJs) Math equations and chemical formulas: https://ckeditor.com/docs/ckeditor5/latest/features/math-equations.html Installing plugins: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html#adding-a-plugin-to-a-build Import Customized Build into ReactJS: https://github.com/ckeditor/ckeditor5/issues/2072#issuecomment-534987536 Display Math equation from CKeditor5 in ReactJS: better-react-mathjax https://www.npmjs.com/package/better-react-mathjax Basic example with MathML: import React from "react" ; import { MathJax , MathJaxContext } from "better-react-mathjax" ; export default function App () { return ( < MathJaxContext > < h2 >Basic MathJax example with MathML</ h2 > < MathJax > < math > < mrow > < mrow > < mfrac > < mn >10...