As you had requested, here is a short video on OAUTH 2.0. More to come stay tuned.
Thursday, January 23, 2020
Wednesday, January 08, 2020
GITLAB commands - High Frequency
I always notice the developers struggling to get the command line right for GIT. I was planning to put together list of frequently used command but came across cheatsheet put by GitLab
https://about.gitlab.com/images/press/git-cheat-sheet.pdf
If you feel there are more which is good to have handy, just write a comment.
Happy Versioning!!!
https://about.gitlab.com/images/press/git-cheat-sheet.pdf
If you feel there are more which is good to have handy, just write a comment.
Happy Versioning!!!
Tuesday, January 07, 2020
T and Z in DateTime like 2009-08-28T23:55:16.000Z
A very simple question for a person who codes(hopefully) but for business users this can be very confusing.
What do you mean by below DateTime
2009-08-28T23:55:16.000Z
Lets explain this
ISO 8601 (The International Standard for the representation of dates and times)
states the following definition
The "T" corresponds to Time of the date(Duhh... no brainer) and "Z" is special UTC designator
So the DateTime 2009-08-28T23:55:16.000Z states
Date as 2009-08-28
Time as 23:55:16.000
"Z" stands for UTC
The above time can be also be represnted in EST as
2009-08-28T23:55:16-05:00 (EST) where -05:00 is Timezone offset
Happy coding!!!
- Metahat
What do you mean by below DateTime
2009-08-28T23:55:16.000Z
Lets explain this
ISO 8601 (The International Standard for the representation of dates and times)
states the following definition
The "T" corresponds to Time of the date(Duhh... no brainer) and "Z" is special UTC designator
So the DateTime 2009-08-28T23:55:16.000Z states
Date as 2009-08-28
Time as 23:55:16.000
"Z" stands for UTC
The above time can be also be represnted in EST as
2009-08-28T23:55:16-05:00 (EST) where -05:00 is Timezone offset
Happy coding!!!
- Metahat
Thursday, November 07, 2019
Parsing Log/Text files
One of the team member was looking for ways to parse through logs to find errors in a big dump of files. I had to go to basics to get the results
C:\Program Files (x86)\Log Parser 2.2>LOGPARSER "Select Text INTO ERROR.csv from
D:\xyz\*.log* where Text like '%ERROR%'" -i:TEXTLINE -q:Off
Statistics:
-----------
Elements processed: 14128022
Elements output: 9845
Execution time: 81.36 seconds (00:01:21.36)
C:\Program Files (x86)\Log Parser 2.2>LOGPARSER "Select Text INTO failed.csv fro
m D:\xyz\*.log* where Text like '%failed%'" -i:TEXTLINE -q:Off
Statistics:
-----------
Elements processed: 14128022
Elements output: 2025
Execution time: 76.43 seconds (00:01:16.43)
Problem Statement: Find all the entries for "Error" and "failed" in big dump of CSV/Log files.
Solution: Old school technique ( Use Log parser)
run below commands
run below commands
D:\xyz\*.log* where Text like '%ERROR%'" -i:TEXTLINE -q:Off
Statistics:
-----------
Elements processed: 14128022
Elements output: 9845
Execution time: 81.36 seconds (00:01:21.36)
C:\Program Files (x86)\Log Parser 2.2>LOGPARSER "Select Text INTO failed.csv fro
m D:\xyz\*.log* where Text like '%failed%'" -i:TEXTLINE -q:Off
Statistics:
-----------
Elements processed: 14128022
Elements output: 2025
Execution time: 76.43 seconds (00:01:16.43)
Monday, May 27, 2019
Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
Error when installing NPM
Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
Fix:
Run command and try again
touch ~/.bash_profile
Reason
https://github.com/nvm-sh/nvm/issues/1837
your system may not have a [.bash_profile file] where the command is set up. Simply create one with touch ~/.bash_profile and run the install script again
Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
Fix:
Run command and try again
touch ~/.bash_profile
Reason
https://github.com/nvm-sh/nvm/issues/1837
your system may not have a [.bash_profile file] where the command is set up. Simply create one with touch ~/.bash_profile and run the install script again
you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry."
Sunday, May 26, 2019
Maven tool is not set in Jenkins pipeline
Maven tool is not set in Jenkins pipeline
Scenario
Error when building the Jenkins pipeline (Pipeline project style)
Error snippet:
+ mvn clean package
/var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: 1: /var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: mvn: not found
Solution
Use the below script to refer to Maven
node
{
def mvn_version = ''
withEnv( ["PATH+MAVEN=${tool mvn_version}/bin"] )
{
sh 'mvn clean package'
}
}
Image of Jenkins Home ->Manage Jenkins ->Global Tool Configuration
Scenario
Error when building the Jenkins pipeline (Pipeline project style)
Error snippet:
+ mvn clean package
/var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: 1: /var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: mvn: not found
Solution
Use the below script to refer to Maven
node
{
def mvn_version = '
withEnv( ["PATH+MAVEN=${tool mvn_version}/bin"] )
{
sh 'mvn clean package'
}
}
Image of Jenkins Home ->Manage Jenkins ->Global Tool Configuration
FOR FREESTYLE PROJECT ( REFER TO MAVEN ERROR)
SSH into a running Linux container - docker
Looking for extensive set of commands, refer
http://phase2.github.io/devtools/common-tasks/ssh-into-a-container/
In summary, use below commands as specified in article
http://phase2.github.io/devtools/common-tasks/ssh-into-a-container/
In summary, use below commands as specified in article
- Use
docker psto get the name of the existing container - Use the command
docker exec -itto get a bash shell in the container{containername} /bin/bash - Generically, use
docker exec -itto execute whatever command you specify in the container.{containername} {command}
running docker as root user
docker exec -it --user root {container id} /bin/bash
Cannot run program "mvn" (in directory : error=2, No such file or directory
Note : In below scenario jenkins was deployed in Linux container
Scenario: Jenkins build failed with error.
java.io.IOException: error=2, No such file or directory
Scenario: Jenkins build failed with error.
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) Caused: java.io.IOException: Cannot run program "mvn" (in directory "/var/jenkins_home/workspace/atmosphere"): error=2, No such file or directory Fix:The issue was due to absence of Maven files in container. To deploy Maven files , follow these steps:
- Go to Global Tool Configuration (http://localhost:xxxx/configureTools/) or navigate Jenkins Home Page - > Manage Jenkins - > Global Tool Configuration
- Scroll down and make the below configuration under Maven Section
- Click Save
- In Jenkins , go to teh Jenkins job and select configure
- scroll down to BUILD Section and select MAVEN_HOME from dropdown
Friday, April 12, 2019
Debugging the Azure Event Grid based Azure Functions locally using Visual Studio
If you want to debug the Azure function locally in visual studio which are triggered by resources like Azure Blog storage e.g. when a file is created in Azure Blog storage account than you are in right place
Check this out
Azure Function Event Grid Trigger Local Debugging
Bad IL format - Azure function
First, try restarting the Azure Function app.
The error generally shows up when changes are made to the function
Monday, April 08, 2019
Friday, November 02, 2018
Monday, October 08, 2018
S3 Bucket Policy - Applying security when redirecting from a domain
If you want to apply S3 bucket policy to protect the GET access originating from a URL , check this example out :
Restricting Access to a Specific HTTP Referrer
Wednesday, August 08, 2018
The requested URL can't be reached - MuleSoft Mock Service Error
Error encountered while accessing Mock Service
The requested URL can't be reached
The service might be temporarily down or it may have moved permanently to a new web address.
for details refer
https://docs.mulesoft.com/api-manager/v/1.x/accessing-your-api-behind-a-firewall
For testing purpose as quick fix "Bypass the proxy". Select option next to "Mock Service" stating " API is behind a firewall"
Actual fix before you implement it in Test/Production environment is to implement and apply a CORS Policy for your browser to be able to load the resources in the API behind your firewall and the Anypoint Platform’s browser tools
https://docs.mulesoft.com/api-manager/v/1.x/cors-policy
Sunday, August 05, 2018
Friday, March 30, 2018
Cloud vs On-Prem
5 min narrative on difference between Cloud vs OnPrem
https://www.youtube.com/watch?v=Ri39--x1d24&t=21s
https://www.youtube.com/watch?v=Ri39--x1d24&t=21s
Sunday, March 11, 2018
Setting VPC as default VPC in AWS
Not a new question and i have been asked about it multiple times in past 2 years. How can i set VPC as "default VPC"
and answers is...
You cannot at this time using console/CLI/ API. If it is must contact AWS support.
Wednesday, March 07, 2018
Mechanical Sympathy - Learning from Racing
Formula 1 world champion once stated
“You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy.”
– Jackie Stewart, racing driver
This fits so well with technology. What Jackie meant is that understanding how a car works make you a better driver. This is so much true for writing code mainly in today's cloud technology. You need to have a basic understanding of hardware to create a good software.
“You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy.”
– Jackie Stewart, racing driver
This fits so well with technology. What Jackie meant is that understanding how a car works make you a better driver. This is so much true for writing code mainly in today's cloud technology. You need to have a basic understanding of hardware to create a good software.
Friday, February 09, 2018
Saturday, February 03, 2018
The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found
Error white running EF framework command
Resolution
Install latest .NET Core SDK
https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.2-download.md
Resolution
Install latest .NET Core SDK
https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.2-download.md
Subscribe to:
Posts (Atom)
Reference Architecture for AI-integrated Genomic Analytics on Oracle Cloud Infrastructure ( Published in Oracle Blog)
I have been thinking about writing this blog for some time. Genomics is a fascinating field and has potential to unlock so many hidden scie...
-
Ever wanted to have a people picker kind of control in Infopath form and that too in browser mode. Did i heard yes :) , well there is a Acti...
-
Am sure lot's of people would be wondering how to hide menu items of a list eg document libraries "Send to " menu item . In o...
-
I got this error for quite some time and i had no clue what was wrong in my page . Page consisted of only 2 panel controls . That's all ...







