Just Sharing Knowledge on Robotics, Electronics and Programming

Thursday, August 22, 2019

How to Copy Colored Script Code in Arduino IDE to Word or other formated text

if you want to write arduino tutorial on a book, and you want to coloring your script like arduino script. there are two ways to do this

1. using snipping tools to screenshot your code
2. using the following ways
  •  Visit  https://codebeautify.org/htmlviewer/
  •  on arduino ide, ctrl+a (select all) your script and Right Click, Copy as html
  •  Paste on HTML input
  • and copy your script on Result : HTML Output to your microsoft word


Saturday, May 11, 2019

Multiple SSL sub Domain LetsEncrypt

If you want to install ssl on all subdomain you can use the following

sudo certbot-auto certonly  -d *.example.com --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns  --manual

Tuesday, April 23, 2019

Android Keystore From Letsencrypt


Download: https://bouncycastle.org/download/bcprov-jdk15on-161.jar
place the file above in the same folder of certtificate

export CLASSPATH=bcprov-jdk15on-161.jar
if [ -a $CERTSTORE ]; then
    rm $CERTSTORE || exit 1
keytool \
      -import \
      -v \
      -trustcacerts \
      -alias 0 \
      -file <(openssl x509 -in cert.pem) \
      -keystore $CERTSTORE \
      -storetype BKS \
      -provider org.bouncycastle.jce.provider.BouncyCastleProvider \
      -providerpath /usr/share/java/bcprov.jar \
      -storepass whisper

How To Install Let’s Encrypt on Ubuntu and Export Jetty Keystore

Step 1 Install Letencryptt:
sudo apt-get install letsencrypt

step 2. download Certbot

sudo wget https://dl.eff.org/certbot-auto -O /usr/sbin/certbot-auto sudo chmod a+x /usr/sbin/certbot-auto

step 3. SSL certificate

sudo certbot-auto certonly --standalone -d example.com  -d www.example.com
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
# convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
# don't need the PKCS#12 file anymore
rm keystore.pkcs12
# Now use "keystore.jks" as keystore in jetty with the keystore password you specfied when you ran
# the "keytool" command
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with

Saturday, April 20, 2019

Maven error :Perhaps you are running on a JRE rather than a JDK?

I've been facing the same issue with java 8 (ubuntu 16.04), trying to compile using mvn command line.
I verified my $JAVA_HOME, java -version and mvn -version. Everything seems to be okay pointing to /usr/lib/jvm/java-8-openjdk-amd64.
It appears that java-8-openjdk-amd64 is not completly installed by default and only contains the JRE (despite its name "jdk").
Re-installing the JDK did the trick.
sudo apt-get install openjdk-8-jdk

Sunday, December 23, 2018

Edit XY Graph Window Simulink Plot

if you want to edit the simulink xy graph, you can follow th intructions below:

xy graph simulink plot
xy graph simulink plot   
1. Run your simulink program, then the XY dialog will show up
2.  Type the following command :

These commands will enable the toolbar in X-Y graph figure window. You can add axes names from Insert >> X Label and Insert >> Y Label.

Sunday, August 26, 2018

[SOLVED] Xamarin Studio Android SDK Not Found ... Searched Windows Registry

If you use Xamarin Studio For the first time, i suggest you to create a very simple apps that is two click. then test your project. if you face the following error :

SetUp : System.Exception : Android SDK not found. Please install it and if it is still not located, please set the ANDROID_HOME environment variable to point to the directory.
Searched locations:
Windows Registry
(No path) - Not set. [ Source: ANDROID_HOME ]


SetUp : System.Exception : Java Development Kit (JDK) not found. Please make sure that it is installed and if it's still not located, please set the JAVA_HOME environment variable to point to the directory.

Searched locations:Windows Registry
 [ Source: JAVA_HOME ]

then use the following solutions (see the picture),
1. Go to this pc and Right -click then click properties