Posts

Cross Domain Issues

If we are setting cookie from api.runxiflute.com to runxiflute.com. We need the following changes

In Request:
mark withCredentials to true



In Response:
Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: https://runxiflute.com

MYSQL Chaining

This describes setting up a new chain with mysql replication.
This is the basic layout. (M master, S1 slave of master, S2 slave of S1)
M <- S1 <- S2
Creating a chain:
On S1: stop slave; systemctl disable mysqld; show slave status\G # COPY THIS TO TEXT FILE show mater status\G # COPY THIS TO TEXT FILE
service mysqld stop;
Create an image of S1, this will be S2. In GCP go to the VM instance of S1, click on its disk, click create Image. ========================================
Log into your new image, S2:
edit /etc/my.cnf, add a way to skip the start of a slave.[mysqld] skip-slave-start
Remove the old UUID, this needs to be unique, so delete it, rm -f /var/lib/mysql/auto.cnf
change the server-id to anything unique vi /etc/my.cnf, find "server-id" change it to something unique EG ** server-id=1552009061
systemctl enable mysqld; #ensure mysql will start on boot
service mysqld start;
reset slave;
Set the new master position. These should be the numbers from step 1.
CHANGE MASTER TO…

vim + tmux

https://www.youtube.com/watch?v=5r6yzFEXajQ

Laravel Service Providers, Facades, Contracts

read
https://laravel.com/docs/5.8/providers
https://laravel.com/docs/5.8/facades
https://laravel.com/docs/5.8/contracts

Geospatial Databases and GeoHash

What is https and how to enable https for your website?

What's a good tutorial? "Good" means someone who both understands the subject and more importantly doesn't try to teach everything at once. So let me tell you what the minimum level of SSL understanding that you as a web developer should have, SSL or TLS actually serves a few purposes. but in order to understand why it exists, we must first answer this question. How do you know that the website you've got in your address bar is the actual website you're talking to? How do you KNOW that when you type bilibili.com into a browser, that your computer is actually talking to bilibili? Your browser requests the DNS records for the name, from the name servers you are configured to trust. And IP address comes back, let's say 1.1.1.1. Your browser connected to that IP and sends the header telling the server. you're looking for a host called bilibili.com. and the server gives you the web page you've asked for based on that information. There are several subj…

What is docker?

https://www.youtube.com/watch?v=M1j41ud2O-M

https://opensource.com/resources/what-docker