Posts

Showing posts from 2021

pgloader not copying data from mysql 8 to postgresql

  Database is already created in Postgres. pgloader mysql: / / user :password @localhost / mydb postgresql: / / user :password @localhost / mydb You can also use a load file to make the tables public after import. Add this to a file (e.g load_file.load): LOAD DATABASE FROM mysql: / / root:mysql @localhost / from_db_name INTO postgresql: / / localhost / to_db_name ALTER schema 'to_db_name' rename to 'public' ; And run: $ pgloader load_file.load

Bootstrap Select Picker append add new item if search not exist

  <select class = "selectpicker" data-live-search= "true" id= "branch" multiple> < option > B.Tech </ option > < option > M.Tech </ option > < option > Ph.D </ option > </select> jQuery script $( '.selectpicker' ). selectpicker ({ noneResultsText : 'No result found <button class="btn btn-dark" onclick=(add_opt(this))>Add new option</button>' }); function add_opt ( event ){ var value = $(event). parents ( 'div' ). siblings ( '.bs-searchbox' ). find ( 'input' ). val (); $(event). parents ( 'div' ). siblings ( '.selectpicker' ). append ($( "<option></option>" ). text (value)). val (value); $( '.selectpicker' ). selectpicker ( 'refresh' ); }

Fix Health status on aws Elastic Beanstalk is red

Image
Solution 1: For someone that may come across this as I did, I found the solution to be   setting up the Health Check endpoint of the ELB target group to an actual URL on my website that returned an HTTP 200 code . On the EC2 dashboard, under Load Balancing -> Target Groups, go to the tab Health Checks and edit the path to a path in your site that returns an 200 code. Solution 2: Change the health check's "Success codes" setting from  200  to  200,301 View image - EC2 -> Load Balancing -> Target Groups