Skip to main content

Posts

Notes on Installing certificate in linux java cacert from a remote host (WIP)

Check the certificates installed or notFind the actual java location using readlink -f `which java`Go to jdk/jre/lib/securityRun the command : ../../bin/keytool -list -keystore cacerts

Get the Certificate (This is WIP, was not getting the correct certificates)Use either of these commands to get the certificates ( need to modify)
openssl s_client -showcerts -connect 10.101.12.89:8087 /dev/null|openssl x509 -outform PEM >emailuat.pem
echo -n | openssl s_client -connect 10.186.18.23:8084 \
    | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > emailuat.cert

Install the certificateFind the actual java location using readlink -f `which java`Go to jdk/jre/lib/securityRun the command ../../bin/keytool -import -trustcacerts -alias emailuat -file /home/akhil/emailuat.cert -keystore cacerts
Recent posts

Configuring Git Aliases and Workflow

Let's agree, no matter what language you code in, developers life is incomplete without using git. 
These are some notes from recent video I watched about git-workflow from Gary  Bernhart's . He shows some cool demonstration of git aliases and workflow he follows.
The git config can be directly used by replacing the .gitconfig and adding the .githelpers at [2].
Prerequisite : You must install diff-so-fancy from [1] and add it's lib folder to the system PATH

I guess I can now live without GitKraken at some point.. 
Usage (alias): [alias]     st = status    ci = commit --verbose    co = checkout    di = diff --find-copies-harder    dc = diff --find-copies-harder --cached    amend = commit --amend    aa = add --all    ff = merge --ff-only    noff = merge --no-ff    fa = fetch --all    pom = push origin master    ds = diff --stat=160,120    dh1 = diff HEAD~1
    # Divergence (commits we added and commits remote added)    div = divergence
    # Goodness (summary of diff lines added/remov…

Installing Flutter In macOS

The google documentation was a bit confusing. So here are the notes to install flutter in mac:
Download flutter sdk : https://flutter.dev/docs/get-started/install/macos#update-your-pathUnzip the flutter sdk in the username folder of your mac.From your username folder type vi .zshrcPaste the line : export PATH="$PATH:/Users/akhilkarun/flutter/flutter/bin"Restart terminalType flutter --versionDone.
macOS version: 10.15.4 flutter sdk version: 1.17.0

Learning Logs

Uncle Bob Video SeriesSOLID PrinciplesEp-13: Dependency Inversion Gist: Role reversed with example son taking care of mom.High level policy should be ignorant of the low level details. For example every IO driver in unix should confirm to the IO Driver Interface and implement the standard Open, Close, Read, Write , Seek functions.

Ep-14: SOLID Case Study

Gist: DB should be a plugin, Delivery mechanism (UI) should be a plugin

ComponentsEp-15: Solid ComponentsGist: 
What is a component? Component is an independently deployable software.
How to start a design? Identify the actors. Then, start with the 'S' in SOLID.
How to implement? High level policy should be ignorant of the low level details.
Ep-15: Solid ComponentsGist:  When component changes, only 1 component per layer should change.
Release Reuse Equivalent Principle: You cannot reuse a component unless the author is willing to manage it thru a release cycle (19:44?)
Responsibility (in SRP) : Corresponds to the needs of an actor
Comm…

Book Review: One Straw Revolution by Masanobu Fukuoka

These are really quick notes made while reading the book 'One Straw Revolution'. This book was written by a Japanese farmer and highly recommend read. 
It not only talks about natural farming, but also leading a simple way of life.

Modern life and science has only found solution to the problem they have created. A person living in nature doesn't need schooling, he needs it only when he has moved far from nature. Similarly, modern farming has only found solution to the problem they have created. It is like this.
A scientist read over thousands of journals and theory papers in his quest for inventions. And when he pause to find what is his quest it is 'inventing eyeglasses'.
Every farm balances itself out. Insects and plants are automatically balanced. 

Later in the book he also points out that crude oil is produced by plants being under high pressure of earth for millions of years and they turn into crude oil which are extracted, transported and processed. Eventually the…

Building Autonomous Drone with Raspberry Pi and APM 2.8

I am a total newbie to hardware and was pushing my limits to see how far I can reach on with hardware projects (which sparked my interest lately). I have set out on a very ambitions mission to control a drone from raspberry pi.I began the research for this around 2 months ago and had brought a raspberry pi, drone body kit and apm flight controller. The key difference of this project from common drone projects is that I'm trying to avoid the use of and RC and instead use the raspberry pi to control it. 


Hardware Installation Setup:
I am using APM 2.8 and Mission Planner.I am using RPi 3 to control the APM 2.8 via Telem port of APMI am planning to power the apm via the battery to ESC (Electronic Speed Controllers)

Now, documenting my steps below:
Day 1Watch TutorialTo get started with APM flight controller, I watched this video tutorial [1] which gives a gentle introduction about APM board. 
Setup APM board and Calibrate SensorsI downloaded the APM Mission Planner software for mac and in…

Programming Raspberry Pi by Examples

Example 1: Programmatically controlling the LED


Join the Raspberry Pi Course (link) Implement LED connection in the course week 2 lecture (link) .







Example 2: Using the DHT11 - Humidity and Temperature Sensor with Raspberry Pi:
The example in Uugear (link) did not work because my DHT11 had the pins in different order the pins were marked + and - rather than S, V and G.

So I connected :


+ symbol in DHT11 ------> 3.3V- symbol in DHT11 ------> GNDout symbol in DHT11 ------>  pin GP4
Also I used this github library (easy to understand) : https://github.com/szazo/DHT11_Python


Example 3: IR Controlling your TV and AC with Raspberry Pi
These 2 tutorial were followed to do this example:

1. http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote (main)
2. http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/ (helped to resolve issues)
3. https://blog.bschwind.com/2016/05/29/sending-infrared-commands-from-a-raspberry-pi-without-lirc/ (to learn about IR reciever)


Ext…