error: exit status 1 stdout(capped at 100k bytes): stderr: ERROR 3546 (HY000) at line 26: @@GLOBAL.GTID_PURGED cannot be changed: the added gtid set must not overlap with @@GLOBAL.GTID_EXECUTED
To solve the problem, open the SQL file with text editor and search the error “@@GLOBAL.GTID_EXECUTED”
It will renew all the certificates, the 1st of each month (0 0 1 * *), and will stop nginx before the renewal and start nginx after the renewal so it can works. It will work on all the linux servers.
La plupart des idées de Robert Kiyosaki dans son célèbre livre “Père Riche, Père Pauvre” se résume dans plusieurs schéma qui résume les différents engrenages des personnes des différentes classes. Notamment au niveau de leurs “actifs”, leurs entrées d’argents, et leur “passifs”, leurs dépenses.
Mind Parachute nous résume également l’idée du livre dans sa vidéo, où il est expliqué la plupart des principes du livre.
On peut qualifier l’auteur comme réaliste ou fataliste, donc ayez un esprit assez ouvert et critique pour comprendre votre situation et l’accepter, pour ensuite pouvoir évoluer vers la situation que vous souhaitez, par exemple l’indépendance financière et ne pas dépendre des systèmes de retraite de l’état.
Egalement, je trouve intéressant la partie présentant les 4 façons de générés des revenus:
Salarié
Indépendant
Business (avoir un système qui génère des revenus)
I made this article in a purpose to know the cost of living across the world, this has not been made for commercial purpose and has been made for real analytic results on the cost of living.
FRANCE
MENU BIG KING XXL : 8.80 EUR
GERMANY
MENU BIG KING XXL : 8.49 EUR(-0.31 EUR, -3.5%)
RUSSIA
MENU BIG KING XXL : 469.99 RUB = 5.63 EUR(-3.17 EUR, -36%)
MOROCCO
MENU BIG KING XXL : 65 DHS = 6.23 EUR (-2.57 EUR, -29.2%)
TURKEY
MENU BIG KING XXL : 67 TL = 5.84 EUR (-2.96 EUR, -33.6%)
ITALY
MENU BIG KING XXL : 7.40 EUR (-1.4EUR, -15.9%)
CZECH REPUBLIC
MENU BURGER KING XXL : 199 CZK = 7.89 EUR (-0.91 EUR, -10.3%)
If you have a database on Google Cloud and you want to import and export some tables to another database, you will need a database explorer to export your .SQL backup.
Export the tables you want in database
Google Cloud interface only allow to export all a database or a specific database, but not tables
As you can see you don’t have the option to select tables. To do so, you will have to connect the database with a SQL explorer. In MySQL Workbench you should go in Server > Data Export
Then you should be able to select the tables you want
select Export to Self-Contained File to have a .SQL file
Import the SQL file to Google Cloud
You will need to upload the SQL file to Google Cloud in order to import it. In order to do it, go to Google Cloud > Cloud Storage, create the bucket if it doesn’t exist yet :
create the bucket dedicated for SQL, with random numbers, to have a unique name
Upload the SQL file generated by MySQL Workbench
Then, you can go on Google Cloud > SQL > Import
Select the SQL file from the bucked and select the database you want the tables to be imported
And then you should have imported successfully the tables on the selected database. You should check it in Operations
In case of errors, check the error in Operations, and modify the .SQL file with a text editor, search the error in the SQL file and remove the lines, and repeat the process (upload it again to Google Cloud Storage and import the SQL file again)
We often need images in our React or Angular app, but putting them in the project is not clean. So we can use Google Cloud with Cloud Storage for the images on your app.
There are many advantages of using Cloud Storage to expose public images : – Real time maintenance (upload, delete, change, …) – You don’t need any commit on your git (if you commit images on your Github / Gitlab for example) – Clean project, only code files – Light project repository to commit, images are heavy quickly
Create a Bucket
First, you need to create a Bucket (it’s like a big folder) if you don’t already have one.
Switch to Uniform access control
Then, to make your Bucket public, go to the Permissions tab, and change the access control to Uniform :
You should click Switch to Uniform, so you don’t have to make public each file one by one
You can see, if you upload your first image, that it’s not public yet
Add public access using by adding a Reader role for allUsers
You can then add the access of Object Reader to allUsers
Then you can see it’s Public to Internet and you are able to copy URL
You can now use you image anywhere, it’s on internet and anyone can see it with the URL, so you can use it to store images for your React / Angular app, all images will work.
You can use a tool that is called “Crontab” for recurring tasks automation. It is available for all the Linux systems and still the most used solution.
Edit the crontab configuration file
crontab -e
This will open vi, the default linux editor, that will allow you to edit the recurring tasks for a specific date and time.
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user command to be executed
In vi the main commands used are: – The escape key (:x! to save OR :q! to quit) – a to append text – i to insert text – dd to remove the line – x to delete the current selected character
Verify the date and time zone
You can verify the date and the time zone (most of the cloud machines are using the UTC time zone). you can use the following command “date”:
In your app you have the result to be listed by distance for exemple, so the user can know who is nearest first, and don’t have to scroll down to see that Elina is nearest. To do so, we can add this portion of code before returning the list of items:
// items : variable containing all the items
// SORT
for(let a=items.length;a>0;a--)
{
for(let b=0;b<a-1;b++)
{
if(items[b].distance>items[b+1].distance) // we order by distance
{
// we swap the items
tmp = items[b];
items[b]=items[b+1];
items[b+1]=tmp;
}
}
}
// returning the response for AWS Lambda
const response = {
statusCode: 200,
body: JSON.stringify(items),
};
return response;
};
There are some differences between Google Cloud and AWS when you want to deploy your function for your API.
My point of view is that Google Cloud function may be a bit more simple to deploy but AWS is in a way the most reliable and complete cloud environnement nowadays.
On both cloud environnement you can upload the code with a ZIP, you can so use the same way to adjust your code for AWS:
We will upgrade the code with a repository that will be in a ZIP
Differences between Google Cloud functions and AWS Lambda (Node.JS)
THE DEPENDENCIES – In Google Cloud, the dependencies are automatically installed from the package.json file – In AWS, you need to install the dependencies with npm or yarn, that will build the node_modules folder If you don’t have the node_modules folder, your Lamdba function will not work with the following error: