Skip to main content

Posts

Adafruit GFX - How to change line spacing in text?

  You may want to update the line spacing to be a little lower than default due to small screen size on IoT devices. I faced this challenge while working on a Watchy hobby project. You may have used a font generator or just using the default fonts and got a *.h file that has the details of the font. In that case just change the last integer value in the PROGMEM variable.

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

Check the certificates installed or not Find the actual java location using readlink -f `which java` Go to jdk/jre/lib/security Run 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 certificate Find the actual java location using readlink -f `which java` Go to jdk/jre/lib/security Run the command ../../bin/keytool -import -trustcacerts -alias emailuat -file /home/akhil/emailuat.cert -keystore cacerts

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   ...

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-path Unzip the flutter sdk in the username folder of your mac. From your username folder type vi .zshrc Paste the line : e xport PATH="$PATH:/Users/akhilkarun/flutter/flutter/bin" Restart terminal Type flutter --version Done. macOS version: 10.15.4 flutter sdk version: 1.17.0

Learning Logs

Uncle Bob Video Series SOLID Principles Ep-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 Components Ep-15: Solid Components Gist:  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 Components Gist:  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?) Responsibilit...

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. Eve...

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 Ins tallation 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 APM I am planning to power the apm via the battery to ESC (Electronic Speed Controllers) Now, documenting my steps below: Day 1 Watch Tutorial To 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 Sensors I downloade...

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 ------> GND out 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/20...

Datamining with Rattle for R - My Talk at GDG, Trivandrum 2015

With rest of the speakers/co-ordinators Recently, I got a fantastic opportunity to be a speaker at Google Developers Fest 2015, Trivandrum. It was a wonderful topic I enjoyed learning and sharing. Data Mining with R for Rattle : And here is me on stage:

Learn Awesome Mnemonic Hacks and Help Build New Ones @ Spellogram.com

Mnemonics are cool techniques that are immensely helpful remembering facts. Be it anything from spelling of english words  to  quantum physics , you can make a mnemonic to learn it.  For example:  The spelling of ' SEPARATE ' is one of the the most commonly misspelled word in English language.  "There is A RAT in sep ARAT e" - visualizing and remembering this sentence will help anyone recall the spelling of separate quickly without mistake.  Another example is the spelling of 'necessary' Just remember the sentence 'Shirts have 1 collar and 2 sleeves' to avoid misspelling the number of 'c' and 's'.   It's a clever idea to keep these tricks under your sleeves to impress your friends or teachers with your new exceptional memory powers.  A trick to recall the first10 element of periodic table is to just remember :  "Henry Hester Likes Beer But CanNot Obtain Food Now" Elements: Hydrogen, Helium, Lithium, B...

Data Mining & Analytics with R : Running R Scripts and Data Mining Techniques - Day 2

Warning: These are my messy study notes, much better legible notes can be found here  http://onepager.togaware.com 1. A Tour Thru Rattle Transform Tab ( by no means near to the full power of underlying R) Data Mining Tabs - Cluster, Associate Model Log Tab  - Capture the corresponding R command Working from Left to Right on Tabs  Remember to Click Execute Button 'Save' -> Projects save the current state, all models etc. 'Open' Projects can be restored at a later time You can even load it back to R  2. First R Program Load rattle and ggplot2 library(rattle)  # Provides the weather dataset  library(rattle)  # Provides the ggplot() function ggplot -> Grammar of Graphics : Just like english grammar or grammar of a computer language. A result of Hadley's Phd . Look him up to learn more details. Then produce a plot using ggplot() # handsondatascience.com - tips on elegantly writing repeated code ds ...

Data Mining & Analytics with R : Introduction to R, RStudio and Rattle - Day 1

This is a blog post on a workshop I attended : a three-day hands-on Workshop on Data Mining & Analytics with R at Technopark, Trivandrum on 5th May 2015 Taught by :  Graham Williams - Senior Director and Data Scientist , Australia Graham.Williams@togaware.com http://datamining.togaware.com Read About  - Literate Programming  - Literate Data Mining Philosophy We are not writing program for the computer, it is written to share with other people. Everything that we write should be written for others. We should control the computer not vice versa.  Introducing Data Science Data Mining  Started in around 1989. Lego house - model - > not real but we get an idea. Data mining is all about building such models. Analytics Descriptive Analytics - what happens , suggestions in Amazon Diagnostic Analytics - explain why the above happened Correlation and Causation - Find up people who ended up in hospital aft...

Hadoop The Definitive Guide [Book] - Study Notes

Chap-1- Meet Hadoop Requirement and adoption in yahoo. A framework that can scale to the web. Map and Reduce acitivity and features like data locality. Can be applied with a variety of algorithms Huge data processing can beat good algorithms Chap-2 - MapReduce The Map Java class and Reducer Java class The Job java class Jobtracker and tasktracker Hadoop reduces the input to input splits or just splits Map tasks write the intermediate output to local disks, so that they can be discarded after use. Outputs of Reduce tasks are stored in HDFS Combiner function can be run on map output, and the combiner functions output forms the input to the reduce function Hadoop streaming proivide hadoop apis in languages other than Java Chap-3 - The Hadoop Distributed Filesystem Fault tolerant solution. Same data written at multiple places. Filesystems that manage the storage across a network of machines are called distributed filesystems. Blocks - a block size is the minim...

How To Publish An Apple Watch App To The AppStore

The Apple Watch launch is almost nearing at the time of writing this article. I'm all excited and ready to submit my first Apple Watch compatible application to the AppStore. I'll write down my learning experience here so that you can publish your own Apple Watch application to the app store . I'll do this step by step, as the work of my current app progress. This article will be updated over time until I reach the final step to see it live in the AppStore. Step 1 : Make the iPhone Part of the Apple Watch An Apple Watch app is not much different from an iPhone app. In fact, it is a sub-part of the main iPhone application running on the iPhone and the Watch App merely acts as the extension of the parent app in the iPhone. So essentially, need an iPhone app anyway. In this scenario, I'm thinking of building an app that will be useful both on iPhone as well as the Apple Watch, instead of solely focusing on the the Apple Watch aspect. The app will be very simple, but al...

Learn Apple Watch Programming Quickly by Examples - My January Challenge

Apple Watch is soon to release, and being a huge Apple Evangelist, I've been very eager to explore the possibilities of what one can make with these 'Most personal device ever made by Apple'. My hopes are high. I'm in a constant mission to excavate this area at the earliest. And guess what, me and my friends have been working on a couple of interesting 'Apple Watch' things lately: 1. Creating a course - ' Learn Apple Watch Programming Quickly By Examples ' 2. Creating a website for Apple WatchKit Tutorials Both are in beta and will be public soon.  I'm trying to get the latest releases of the WatchKit sdk (which is bundled in Xcode 6.2 beta and higher and is required to build Watch Apps) and trying to publish tutorials on new APIs as and when they come. Following are my objectives with both these online ventures Teach things more by examples and less by theory Convey ideas at the simplest form possible Keep user-interaction at the heart ...

I'm Live Blogging : AndroidWear and Good Programming Practices - Google Developer Group Trivandrum DevFest 2014

Android Wear  Notifications done for android apps will automatically come to the AndroidWear without any extra coding. Main UI Stacks  Pages - Multiple Glancable Pages Replies - Via Voice Commands etc Development Option Make Apps Specifically For AndroidWear Most apps will have a companion app in wear and main app in phone. SOLID - Principles of OOP Robert C. Martin ( Uncle Bob) Agile Software Development: Principle, Patterns and Practices objectmentor.com/omTeam/martin_r.html Google compute engine  There was a over view of less heard about technology - Docker. This is massively helpful for sys admins to spin up vm's and deploy quickly. Rapidly reduces the total turn around time.  Resources Docker.io Blogs mentioned to read Wired.com

I'm Live Blogging : Polymer, Webcomponents - Google Developer Group Trivandrum DevFest 2014

Overview  Started (by +Arun Shanker Prasad  ) with a slight intro and kicked-off with an overview of a data science application that was built by the Qburst (Company) team. And then moved over to Web Components and Polymer. Parser Combinators for Event Detection Presenter :   +Navin Philip  ,  Associate Architect, Qburst A beautiful project data-crunching app that utilises the Theory of Computation to verify and quantify different hypothesis and give useful results. Had a quick demo. d Web Components webcomponents.org Presenter : Shyam, Qburst Why Web Components? You could import/export encapsulated custom components. There are 4 main technologies in web components. Eg:  Make a Facebook like button without importing javascript. Include maps in a page.  googlewebcomponents.github.io customelmeents.io Polymer , X-tags( (Mozzila), Bosonic (Independent)  Templating New templating tags in html. ...