Thursday, November 14, 2019

ORA-28000: the account is locked - FIX


## unlock oracle user account of my_user
>Login as SYSTEM 
SQL>ALTER USER my_username IDENTIFIED BY my_new_password ACCOUNT UNLOCK;

##check password lifetime
SQL>SELECT resource_name, limit FROM dba_profiles WHERE profile = 'DEFAULT' AND resource_type = 'PASSWORD';
##Change default limit to unlimited in ORACLE
SQL>ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Share Article : ORA-28000: the account is locked - FIX
Share/Save/Bookmark

Wednesday, October 16, 2019

Git, how to do a clean squash easy way


Simple as following

> git checkout bugfix/bugone
//do 6 commits and push it upstream
//now you want to squash all 6 in to one
//do the sqashing by number of commits
> git reset --soft HEAD~6 &&
> git commit
//force push the newly created single commit to upstream
//make sure you are the only user of this branch
> git push origin bugfix/bugone --force

Share Article : Git, how to do a clean squash easy way
Share/Save/Bookmark

Friday, August 19, 2016

Raspberry Pi Development Server for Home



We all got development server at our work. But we all like to have a dev server for our cool stuff we do at home. It may be freelance or pure technical interests.
We know we can set it up, but how and the associated complexities keep us form really setting up a dev server for home.

So let's see how we can do this on a Raspberry-pi.

What you need

  • Raspberry-pi - that's the whole point, right :) 
  • A Micro USB charger - for the PI
  • An Ethernet cable - for initial connectivity. Later with a wifi dongle you can set-up a wifi connection. 
  • A microSD card (minimum 8GB, and cards up to 32GB seem to work fine)
These will also come in handy during the initial setup:
  • A USB keyboard
  • An HDMI cable and monitor



  1. Install Raspbian on PI.
  2. Install remote desktop software on PI (it's easy to connect to PI this way than using mouse/keyboard/monitor whole setup)
  3. setup ssh on PI
  4. Install a web server
  5. Setup access to your local server through internet. You can user NgRok for that.
  6. Install your preferred dev environment(java based/node.js based etc)
  7. Setup a project on Bit-bucket
  8. Setup access from PI to your Bit-bucket project
  9. Configure PI to pull latest code from the Bit-bucket.
  10. Now you are there push you code to Bit-bucket and build it on PI 


So that's all you need to do. If you already got experience on this, you can set it up easily.
Otherwise just see the detailed instructions on most of these steps on this blog post
How to Turn Your Raspberry Pi Into a Development Server .


Share Article : Raspberry Pi Development Server for Home
Share/Save/Bookmark

Wednesday, November 25, 2015

Make Raspberry Pi Serial port available over Ethernet


Make Raspberry Pi Serial port available over Ethernet

To do this on raspberry-pi first install socat.

Then run following commands.

  1. On the raspberry-pi  run following command to redirect tcp data on port 54321 to serial port ttyAMA0

sudo socat tcp-l:54321,reuseaddr,fork file:/dev/ttyAMA0, nonblock, raw, waitlock=/var/run/ttyAMA0.lock

  1. On other connecting(client) linux machine run following command to create a virtual serial port and direct it to tcp port of the raspberry-pi 54321 port.

sudo socat pty,link=/dev/ttyAMA0,waitslave tcp:10.42.0.3:54321

  1. Now when you write to virtual serial port on the linux pc it get to the actual serial port of raspberry-pi over ethernet connection. However this seems to be a blocking the port.
  2. Checked on pi4j read/write on same port and read hangs. So as a solution to this create another virtual serial port on raspberry pi and map it to actual serial port. Then read/write to it. It fixed the problem.

sudo socat PTY,link=/dev/ttyAMA0 PTY,link=/dev/ttyAMA1

Srinath Gamage has attached the following document:
Make Serial port available over Ethernet
Google Docs: Create and edit documents online.Logo for Google Docs

Share Article : Make Raspberry Pi Serial port available over Ethernet
Share/Save/Bookmark