Installing Latest MongoDB version on Ubuntu 14.04 LTS 15.04

How to Install MongoDB on Ubuntu 14.04 and 15.04 As we all know that MongoDB is becoming a default choice for certain part of community and is also emphasized as M in MEAN stack. Its an open source NoSQL database that is available free of cost and that you can make use of. In this article I will show you to quickly utilize official MongoDB repository to get and install most recent version of MongoDB.   Prerequisites You will need a running Ubuntu 14.04 server and a sudo non-root user, A great article on setting up such account can be found here What you need to do By default, MongoDB package is included in official Ubuntu package repositories, but this does not guarantee that its the latest version, so a better and recommended way to install MongoDB is to Import the MongoDB public GPG key used by the package management system. [crayon-55e6796f0afd6818240000/] Once you are done with above command you will see something like this Output [crayon-55e6796f0aff3894934364/] Next Let's add Mongo repository details to APT, this is required so you have apt  remember where to find MongoDB the next time you want to update it. Use the commands below [crayon-55e6796f0b006313559767/] Let's now update the package list by using the command below [crayon-55e6796f0b018594466125/]   Next We install MongoDB by issuing the command below [crayon-55e6796f0b034750152721/] When installation finish,  you now have a MongoDB server, Mongo shell, and other Mongo tools such as mongoimport, mongodump etc You can now verify if MongoDB server s running by issuing the following command [crayon-55e6796f0b045356884093/] Helpful commands Stops mongo sudo service mongod stop Start mongo sudo service mongod start Restart mongo sudo service mongod restart You can read more on official Mongo docs website http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ I hope this helps Cheers. … [Read more...]

Ace editor cursor position has space between expected position and the current position

Hi, I have used Ace editor a few times in my previous projects. Never did I face this problem before of having my cursor misplaced in my Ace editor. Let me guide you step by step Editor markup Here is a markup where I want my Ace editor to show up. [crayon-55e6796f0d6bc198727821/] Then I have this CSS that applies to the editor element CSS [crayon-55e6796f0d6d4856050550/] Above CSS allow my editor to take entire space within the document body or relatively positioned container. Then comes the Javascript to do its magic [crayon-55e6796f0d6e8430695204/] Now the editor will show up and I am able to do my thing. However I now have a unique issue where when I start to type the cursor position is a bit far from the text, so basically I have a gap between the expected and actual cursor position in my Ace Editor as shown below It turned out that Ace editor must use monospace font and I was setting fonts on a not so recommended way as shown below [crayon-55e6796f0d6fc210453539/] Just to check things out and enforcing my editor to use monospace font fixed the issue instantly. This is what I changed my styles for my editor instance to which solved it. [crayon-55e6796f0d70d596999884/] I also ended up cleaning the way I was applying my fonts to all my elements by getting rid of * construct. I hope this helps   … [Read more...]

Online webpage to image conversion with ImgCake.com includes API

Hi Guys, I thought I would inform that there is a new tool available for taking screenshots of webpages called imgcake.com Talking about features there are many Unlimited renders/month High quality renders Custom window and shot size 30 days caching for web shots Delivery over SSL Webpages are rendered to either PNG or JPEG Enforce a new web shot to override cache Up to 10 referring websites per account Free Email support Custom user agent or accept language headers Reliable Flexible Cancel anytime First 7 days free Over 3000+ fonts supported This makes it quite appealing, so if you don't want to host your own screenshoter then this tool will help you out to get started. With Free support and anytime cancellation of your subscription it can't get any better. Renders are delivered over SSLto make it even more appealing. Render time varies as renders cannot happen until full page is downloaded. Try it out I bet you will like it. Regards     … [Read more...]

CommandLine Convert WMF, EPS etc to SVG using inkscape

Hello, I thought this might be a good tip to share for people who are looking to convert their vector images to SVG format. inkscape is the right tool just for that. Get inkscape from their website https://inkscape.org/en/ for you operating system Download it and install it. Make sure that inkscape executable to environment path. I am using windows but commands to convert any of the supported format to SVG is not different in any other operating system too. Example 1 Below is command to convert an EPS file to SVG file [crayon-55e6796f0e88b783667470/] Above command will out test.svg file which you can view using any modern browser or SVG viewer Example 2 Command below will convert a wmf file to svg. Please note that wmf is primarily a windows format and this command will only work in Windows. [crayon-55e6796f0e8a5146157084/] So this is just a start you can explore more command line options available with inkscape from link provided in resources section of this article If you have anything else to add please leave your comment. Let others benefit from what you've done with your work or if you know of any other tool that is capable of doing better job. I will be writing a tool based on inkscape for batch processing files. Resources Command line options for inkscape inkscape website … [Read more...]

Installing New Comodo Positive SSL Certificate on Apache and OpenSSL on Centos, Fedora and RedHat

Hello, I had to buy a certificate and install it on my new server I was issued with a new certificate by Comodo under Comodo Positive SSL. To start with I think it doesn't matter which certificate you choose, end of the day they all follow pretty much same standards and the only thing that make a certificate expensive is a company or issuing authority such as thwate (expensive). I personally always choose a cheapest certificate on market. Anyway with latest certificate I received 4 files in an archive as shown below You could just install a certificate by adding [crayon-55e6796f0f39e238619780/] and it will work on some browsers but you would need intermediate cert as well. Here is what always gets me. With latest PositiveSSL They give us 3 files which we need to combine and feed it to [crayon-55e6796f0f3b6215470294/] So to do that you will run this command [crayon-55e6796f0f3c7002687875/] Considering that all you files are under /home/crt/2014 folder our final VirtualHost confg will look like this   [crayon-55e6796f0f3d8433399843/] Once you made above change, don't forget to restart your apache service generally located as /etc/init.d/httpd restart on Centos and Red Hat OS If you have any comment or would like to point out any error please leave your comments. … [Read more...]

Rackspace Cloud FIles Bulk Delete objects prefixed/* wildcard php sdk

Hi Guys   Rackspace cloud files is an awesome file storage system, We upload a file and can make it publicly available through their CDN. While I use Cloud files in pretty much all my projects at work or personal stuff, one thing that I did today was to delete objects with specific prefix e.g. Lets say I have these objects under container "jcorg" hello hello1 hello2 anothervaluableobject and I want to delete all objects whose name starts with hello Here is a code snippet that will be handy for you Language: PHP API link: https://github.com/rackspace/php-opencloud and of course you can use equivalent code in other language SDKs too     Code Snippet [crayon-55e6796f10278241373918/] Let me give you a brief overview to you First we are creating a connection to Rackspace server, depending on which region you are in you will use either RACKSPACE_US or RACKSPACE_UK to authenticate your request. [crayon-55e6796f10294581142665/] Then we are connection to our object store [crayon-55e6796f102a7586962455/] Then we are getting hold of object list where name or an object starts with "hello" [crayon-55e6796f102b7432781514/] Finally we are iterating on objects found and deleting them. You can check object name here to just to filter them out before you process them for deletion [crayon-55e6796f102c8353746056/] I hope this makes sense, but just in case if you have a question, do leave your comment.     … [Read more...]

How to make xml_split, xml_merge, xml_pp, xml_grep, xml_spellcheck under XML-Twig tools work on Windows

Large XML files could sometimes lead to overall slowness of your program. Thus it makes sense to sometimes split them to rearrange contents within to optimize querying your XML files. This post will touch base on how to split a large XML file on windows OS and I will use a cool tool written by Michel Rodriguez. XML-twig is presumably an open source library that works on large XML files. Notable tools includes XML Grep XML merge XML pretty printer XML spell check XML split Our focus is to build this library on windows so that we can use it from windows command prompt Download XML-Twig Get this library from cpan websites. Here is the URL http://search.cpan.org/~mirod/XML-Twig-3.48/Twig.pm Download the XML-Twig-3.48.tar.gz file and extract it under c:\devtools Here is a screenshot of what it looks like on my machine   Lets leave it there for the time being and install prerequisites Pre-requisites There are a couple of pre requisites that you will want to install. Perl. As this library is written in perl so you would want to install Perl on your system. ActiveState perl is something that I sometimes use and is a good option by far on Windows computers. Download for your processor arch 32 bit or 64 bit from the URL below http://www.activestate.com/activeperl/downloads I installed it under c:\perl64 Visual studio Express 2010 for tool called "nmake" I've got Visual studio 2012 but you can get an express edition of "Express 2013 for Windows Desktop" from URL below http://www.visualstudio.com/en-US/products/visual-studio-express-vs#2010-Visual-CPP Now that perl is available from command prompt You may also want to run this command ppm install MinGW64 Above will install dmake as a perl module too just in case if you want to use that. But in this article I will use name.   That's it for the pre requisites and I hope that you would have installed both of the above so that we can move on to next … [Read more...]

Google MarkerClusterer Handling Multiple Markers On Same Geo Location

When you are dealing with addresses on Google Maps there are times when you have multiple addresses for a same location. For example if you live in a building with 200+ apartments, building address remains the same but you also add apartment number to your address to precisely locate you. Here are couple of address examples 1/991 Buleen Road 2/991 Buleen Road From the example above its clear that 991 buleen road is building address, 1 and 2 are apartment numbers. I would just use InfoWindow to go with MarkerCluster to show details of multiple points. Lets check out the code below   [crayon-55e6796f253d3709547184/] And that's pretty much it. Here is a working example of above code Two things to remember while doing above code You have to instantiate MarkerClustere [crayon-55e6796f25402561290931/] While creating Markers, you can add any custom property to your marker, or hell of an amount of data, so when you create your info window, you have that data available. Also you can have a look at another way of handling it https://github.com/jawj/OverlappingMarkerSpiderfier I hope this helps or at least gives you a pointer what you should be doing for multiple markers for same location. Cheers,   … [Read more...]

How to clear DNS Cache in Windows small business server 2011 or windows 2008 r2

G'day While I do not write on Windows server too often but here is that once in a blue moon article or you can assume a quick tip on how to clear DNS cache, Reason can be any but sometimes we have to do it. Locally we will just use [crayon-55e6796f403ed268228590/] to flush local DNS issue but on the server side here is how its done Step 1 Goto Start > Administrative tools > DNS You will see all your zones including forwards, reverse lookups and conditional forwards. To view Cached lookup goto View > Advanced Now you will see an entry called Cached lookups appear as shown in image below Gobind is my server name. Step 2 (Clear DNS cache) From here on there are 2 ways you can clear your cache. Either select Cached lookups entry and then Goto Action > Clear cache  as shown below OR Right click on Cached lookups entry and then left click Clear cache from cotext menu as shown below   You don't have to restart your DNS service. You can then Right click > Refresh to see if caches are gone, they will :) I hope this helps, In case you would like to leave your input, do so by leaving your comments.         … [Read more...]

Google Maps How to do a KML Layer overlay fill

Hi Guys, Now that I am experimenting with Google Maps I thinks its about time to write a few articles. This is the first one in the series to follow in coming weeks. This post covers how to draw a KML Layer overlay using Google Maps. Good thing is that as of version 3 there is no external library is needed to do what we are going to do. KML that I am going to use can be downloaded from the link provided at the end of this post. Final result will look like below Code Snippet You would have a clue how to use Google Maps API to draw simple maps so I am not going to explain line by line but you can use the code snippet to extend it   [crayon-55e6796f496d8463777582/]   This will produce a nice KML Layer with a polygon created from the coordinates supplied from the KML data. To change the colors of the line and highlighted area you can change color value under style element values as shown below [crayon-55e6796f496f8929767990/]   Remember color property is not your typical HEX color. Its defined as aabbggrr (alpha, blue, green, red)   Download Demo KML You are able to download the KML file from the link below https://dl.dropboxusercontent.com/u/1277098/3075.kml That's about it actually.  Most of the power is in your polygon data and GM API take care of the rest. I hope this helps Cheers, … [Read more...]