Sunday, September 19, 2021

How to get credentials of Google Workspace API with pythen

 when we use Google Workspace API ,first login account get credentials .

https://developers.google.com/sheets/api/quickstart/python

https://github.com/googleworkspace/python-samples/blob/master/sheets/quickstart/quickstart.py

Run code,then login google account








show messenger

The authentication flow has completed. You may close this window.




We get token.json in Working directory




If you get error,your credentials is not right.

error: Client secrets must be for a web or installed app

Read google developer

https://developers.google.com/workspace/guides/create-credentials 



Tuesday, August 31, 2021

cordova build : FAILURE: Build failed with an exception.

  Run "cordova build"



Failed to install the following Android SDK packages as some licences have not been accepted.

 platforms;android-29 Android SDK Platform 29



Go to SDK manager


 uncheck the version 31 and check the 29





Failed to find 'android' command de path to valid SDK directory. Cordova

 Failed to find 'android' command de path to valid SDK directory.

Add ANDROID_HOME to  System variables

C:\Users\{username}\AppData\Local\Android


add to  path


%ANDROID_HOME%\tools\;%ANDROID_HOME%\platform-tools\;


Saturday, May 15, 2021

WAMP CORS error

 



CORS error




Wampserver 403 Forbidden

 You don't have permission to access this resource.


website is normail with localhost  .


but website is Forbidden with Extranet.


C:\wamp64\bin\apache\apache2.4.46\conf



Find httpd.conf file
# onlineoffline tag - don't remove Require local



change
#   onlineoffline tag - don't remove
Require all granted



httpd-vhosts.conf

Require local change to "Require all granted"



 Windows server + Wamp +php +mysql

Wednesday, May 5, 2021

"You cannot delete a plugin while it is active on the main site" wordpress plugins

 "You cannot delete a plugin while it is active on the main site" wordpress plugins can't delete.


Purge All Caches



Sunday, May 2, 2021

Warning: Certificates may not renew automatically. due to a web server configuration issue.

Automatic renewal Let's Encrypt with "sudo /opt/bitnami/bncert-tool"




Warning: Certificates may not renew automatically. due to a web server configuration issue.


httpd-vhosts.conf add



again




Saturday, March 20, 2021

Google domains add SPF of DNS ,but Email Service authenticate fail

If Google domains use SPF(Sender Policy Framework, RFC 4408) ,the Email Service (sendinblue) can't authenticate this SPF.


How to solution the SPF  can't authenticate by Email Service?




Use txt of DNS and add new txt,input data of SPF.


Wait some time,maybe 1m~24hr,then you can check SPF







Wednesday, March 10, 2021

Friday, March 5, 2021

How to Troubleshoot Permission Issues with SFTP

 

  • Change the owner of the folder or file to bitnami (remember to replace the TARGETFOLDER placeholder with the proper path):

    sudo chown bitnami TARGETFOLDER
    sudo chmod +w TARGETFOLDER
    
  • You should now be able to upload files to the folder or replace the file. When you are finished, restore the original permissions. For the case above, the commands are as follows:

    sudo chown daemon:daemon TARGETFOLDER
    sudo chmod 0775 TARGETFOLDER


https://docs.bitnami.com/virtual-machine/how-to/troubleshoot-permission-issues/

Sunday, February 28, 2021

How to http 301 URL redirection to https(SSL) with httpd-vhosts.conf ? (AWS Lightsail,LAMP,wordpress)

How http 301 URL redirection to https(SSL)  with httpd-vhosts.conf ? 


This environment is  AWS Lightsail ,LAMP,and more website with apache virtual host

Wednesday, February 24, 2021

LAMP installation SSL And set wordpress with https (AWS Lightsail )

 



LAMP installation SSL 

https://lightsail.aws.amazon.com/ls/docs/zh_tw/articles/amazon-lightsail-using-lets-encrypt-certificates-with-lamp#request-a-lets-encrypt-certificate-lamp




https://serverfault.com/questions/744960/configuring-ssl-with-virtual-hosts-under-apache-and-centos

<VirtualHost *:443>
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /var/www/example.com/public_html
    ErrorLog /var/www/example.com/error.log
    CustomLog /var/www/example.com/requests.log combined
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/example/apache.crt
    SSLCertificateKeyFile /etc/apache2/ssl/example/apache.key
</VirtualHost>

<VirtualHost *:443>
    ServerName www.example2.com
    DocumentRoot /var/www/example2.com/public_html
    ServerAlias example2.com
    ErrorLog /var/www/example2.com/error.log
    CustomLog /var/www/example2.com/requests.log combined
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/example2/apache.crt
    SSLCertificateKeyFile /etc/apache2/ssl/example2/apache.key
</VirtualHost>




Tuesday, February 9, 2021

AWS SSH login no supported authentication methods available server sent publickey

 PuTTYgen load [your ssh mane].ppk

copy ssh all



.ssh and 





authorized_keys


paste from ssh and save



https://askubuntu.com/questions/204400/ssh-public-key-no-supported-authentication-methods-available-server-sent-publ