Kurinchi Blogger Scribbles …


Archive for the ‘General’ Category

Feb 22
2017

Git: Reset local branch to make it the same as remote branch master

Last updated: February 22nd, 2017

Go to your local repository in bash

$ git fetch origin

$ git reset –hard origin/master

To clean and remove untracked files and directories

$ git clean -fdx

Feb 15
2017

Git: How to reset Develop branch to be in sync with Master branch?

Last updated: February 15th, 2017

First checkout Develop branch

$ git checkout dev

Then, reset it to Master branch
$ git reset –hard master

Make sure to push the changes by force to make origin/dev to be the same as origin/master
$ git push –force origin develop

Dec 29
2016

Git error: src refspec master does not match any

Last updated: December 29th, 2016

Point 1) Check if you have followed the below sequence of steps when setting up git in your local workstation

$ git init

$ git add .

$ git commit -am “name of the commit”

$ git remote add origin https://github.com/username/repository.git

$ git push -u origin master

Point 2) Check if .git/config file has the following parameters in it

[branch “master”]

remote = origin

merge = refs/heads/master

Dec 21
2016

Python PIP install: Insecure platform warning

Last updated: December 21st, 2016

Normally, installing a python module and its dependencies is done via Pip. If HTTPS is blocked in private networks, then things might get tricky and you get the following message.

InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.

To bypass this, you can issue the below command to trust pypi.python.org

$ pip install –trusted-host pypi.python.org Flask

To make sure that the needed module is installed, check it by

$ pip freeze

Aug 01
2014

Wireframesketcher – Tool for prototyping

Last updated: August 18th, 2014

Wireframing is one of the most valuable phase of any application development process. Understanding requirements from customers is the key step to project success. When this process is done with a right wireframing tools such as WireframeSketcher, PowerMockUp, Gliffy (some of the tools that I experimented this year) it helps designers produce quintessential designs in short span of time and developers understand finer details of the design elements.

As a startup, I was using paper-and-pencil model for wireframe creation to take down requirements, visually portray design concepts and straighten project objectives for creating web applications. Going with the traditional method of prototyping had its own drawbacks and the four major ones are
a) flexibility to change or tweak the prototypes built in short duration
b) re-usability of the prototypes built in the past to save time
c) option to develop prototypes in online and offline mode
d) easy options to save, export prototypes in digital formats
(more…)

Feb 21
2014

YEOMAN – Yo, Grunt, Bower – Power tools for front-end developers

Last updated: February 21st, 2014

Yeoman is a tool for modern workflow to aid front-end web application development. Yeoman consists of three tools to manage this workflow and has generators available for Angular, Backbone and a collection of over 100+ other projects

+ Grunt – It is the builder and utility component that helps automate repitive tasks, script minification, javascript task compiler, compiling sass, coffee script
+ Yo – It is the code generator component that helps in scaffolding, writing boilerplate code, install some grunt tasks
+ Bower – It is the package manager for web and it helps fetch javascript library and/or javascript/css frameworks and its dependencies. This is similar to Maven for java.
Dec 25
2013

Firefox: Responsive design testing for Mobile devices

Last updated: December 25th, 2013

Follow the below steps to set the preset value for responsive design testing on mobile devices

i) Go to the address bar in firefox and type “about.config

ii) You will get a warning message stating “This might void your warranty … Changing these advanced settings can be harmful to the stability …..”. Click the button “I’ll be careful, I promise!’

iii) In the search bar, type “presets” and look through the filter values for “devtools.responsiveUI.presets“. Double click on the preference name “devtools.responsiveUI.presets” and enter the values

[{“key”:”320×480″,”name”:”iPhone 3g/3gs”,”width”:320,”height”:480},{“key”:”360×640″,”name”:”Nokia E7, n90″,”width”:360,”height”:640},{“key”:”640×960″,”name”:”iPhone4/4s”,”width”:640,”height”:960},{“key”:”640×1136″,”name”:”iPhone5/5c/5s”,”width”:640,”height”:1136},{“key”:”768×1024″,”name”:”ipad1/2″,”width”:768,”height”:1024},{“key”:”800×480″,”name”:”Android-WVGA”,”width”:800,”height”:480},{“key”:”800×1280″,”name”:”KindleFireHD8.9″,”width”:800,”height”:1280},{“key”:”2048×1536″,”name”:”Retina display”,”width”:2048,”height”:1536},{“key”:”600×800″,”name”:”KindleFire/Galaxy/Nexus”,”width”:600,”height”:800}]

Once the values are entered, you can open a new instance of the browser and click ctrl + shift + m to open up the responsive web view

Dec 24
2013

Responsive web page testing tools available online

Last updated: December 25th, 2013

QuirktoolsScreenfly

Interesting site to test mobile web pages of various screen sizes (kindle fire, samsung galaxy tab, google nexus 7, apple ipad 1 – 3 mini, kindle fire HD,  motorola razr v3m, motorola razr v8, blackberry 8300, apple iphone 3 & 4, LG optimus S, Samsung galaxy S2, ASUS galaxy 7, apple iphone 5, samsung galaxy s3/s4)

Also this tool offers landscape and portrait modes in addition to scroll & retina effect.

StudiopressResponsive testing

Responsive test from responsivetest.net

Another interesting tool available online to check web page responsiveness on mobile phones, tablets, laptops and desktops. The web tool has resolutions for testing categorized by devices Apple, Blackberry (Bold 9930, Q10, Torch 9810, Torch 9850, Z10), Samsung, HTC, LG

Other tools

Browser resizing – http://resizemybrowser.com/

Responsive pixel – http://responsivepx.com/

Demonstrating responsive design – http://www.jamus.co.uk/demos/rwd-demonstrations/

Refer Wikipedia for the display of devices by pixel density http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density

Mar 17
2013

How to fix Hibernate MySql connection timeout issue (solved)?

Last updated: June 14th, 2013

When we began creating an application using Struts2 framework with Hibernate and MySQL, we ran into a problem which was related to MySQL timing out its connection after a span of 8 hours when left unused. It conceived a lot of time at our end but we were able to nail down the issue at the end.

Steps that we had taken to correct the issue related to Hibernate MySql connection timeout problem are listed below

– Download Hibernate C3P0 and copy .jar files
– Set c3p0.properties
– Make changes to hibernate.cfg.xml
– Test MySQL connection timeout
– Hibernate, MySQL connection timeout related error messages
(more…)

Oct 05
2012

XML (Extensible Markup Language) Vs. CSV (Comma Separated Values)

Last updated: October 5th, 2012

CSV is flat file with the data separated by commas. If we needn’t have to establish a relationship in the data presented in the CSV file, then we can go with storing the data as CSV and manipulate the content for display in the web pages.

XML allows hierarchical representation of data. Data in XML is more readable when it comes to presenting the data. Data can easily be validated with XSD and can be accessed with a couple of lines of code. Huge advantage of XML is its flexibility to establish relationship in data.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict