Use this link to get free uber rides
https://www.uber.com/invite/zbpmf
Filed under: free, Web2.0 | Tagged: cab, free, rides, taxi, uber, uberX | Leave a comment »
Use this link to get free uber rides
https://www.uber.com/invite/zbpmf
Filed under: free, Web2.0 | Tagged: cab, free, rides, taxi, uber, uberX | Leave a comment »
Ran into mysql startup issue after upgrading to El Capitan.
All you need to do is run the following command and set the ownership back to mysql:wheel
Filed under: database, el capitan, mac, mysql | Tagged: mysql, OSX EL CAPITAN | Leave a comment »
Spring JPA by default uses ImprovedNamingStrategy..this will convert your camel case field name to snake_came column names.
If you need to override this, just use thespring.jpa.hibernate.naming_strategy property.
(eg) – to use EJB naming strategy, you can do the following
spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy
This would retain the case ( and not convert your columns to snake_case)
You can also override using @Column annotation
Filed under: JPA | Tagged: column case, hibernate, jpa, naming strategy, spring boot, spring web | Leave a comment »
I was recently installing cassandra on my mac and ran into brew permission denied error.
You can run the following command to fix this error
sudo chown -R $USER:admin /usr/local /Library/Caches/Homebrew ( run the same on any other Homebrew directories as well like logs )
Filed under: Web2.0 | Tagged: brew, mac osx, permssion denied | Leave a comment »
A simple team exercise to reboot the team. This will create a better harmony among all team members, close out any misunderstanding, identify areas of improvements, provide inspiration, drive confidence & motivation and plenty more.
Start, Stop and Continue – This is powerful tool for leaders to build a better organization, world class teams and useful strategy for coaching individuals.
Most of us leaders have probably done this in some shape or form.
Above all treat each other with respect. Empathy is very important.
Happy team building. 🙂
Filed under: Web2.0 | Tagged: coaching, feedback, leadership, mentoring, teambuilding | Leave a comment »
Tomcat can also be used to serve static content outside of the webapp archives ( war).
Here is what you need to do to enable this
Edit server.xml file and add the static route config.
<Host appBase="webapps"
autoDeploy="false" name="localhost" unpackWARs="true"
xmlNamespaceAware="false" xmlValidation="false">
...
<Context docBase="/www/html/static" path="/static" />
</Host>
What this does is that any URL request which begins with “/static” ( think of this like the doc root in a web server ), tomcat will serve those request from /www/html/static directory.
docBase and path can be anything. Just make sure these dont match your web app’s context root.
Enjoy!!
Filed under: container, tomcat | Tagged: content, static, Tomcat | Leave a comment »
If you need to enable CORS in tomcat ( or alternatively just serve your response in JSON-P format) you will need version 7.0.41 or greater.
Simply add the following in your web.xml file
<filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> </filter> <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
This will ensure that the client browser honors the response that is returned from your app server.
You only need this if the client domain is different from the server which is returning your response.
Filed under: Web2.0 | Tagged: AJAX, CORS, Tomcat, web.xml | 2 Comments »
If you use maven to build your eclipse projects, you may notice at times that your eclipse IDE would show errors ( especially if you modified your pom to pull in new dependencies) but maven builds without errors.
To fix this you run the following commands – make sure to close eclipse and reopen it
mvn clean eclipse:eclipse
What this does is that it blows aways all eclipse configs and recreates those.
OR you can alternatively not use maven and just use gradle 🙂
Filed under: Application development, Eclipse, IDE, java | Tagged: build, eclipse, errors, maven | Leave a comment »
The following command will capture your android device’s screen using adb
adb shell screencap -p | perl -pe ‘s/\x0D\x0A/\x0A/g’ > MyScreen1.png
Filed under: Web2.0 | Tagged: adb, Android, screen, screencap, screenshot | Leave a comment »
The following command would recursively delete files and/or directories on your *nix (+OSX) system
find . -type f -name .DS_Store -exec rm -rf {} \;
Since .DS_Store is a file I have used “f” flag in the find command.
If you need to delete directories then use the “d” flag like
find . -type d -name .svn -exec rm -rf {} \;
Filed under: file management | Tagged: delete, linux, OSX, Recursive, Unix | Leave a comment »