Welcome to JC Coupon Administration.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/jaspreet/public_html/messages.php:22) in /home/jaspreet/public_html/wp-content/plugins/WPFanMachinePro/fbdatasimporter.php on line 14

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/jaspreet/public_html/messages.php:22) in /home/jaspreet/public_html/wp-content/plugins/WPFanMachinePro/fbdatasimporter.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home/jaspreet/public_html/messages.php:22) in /home/jaspreet/public_html/wp-content/plugins/wp-greet-box/includes/wp-greet-box.class.php on line 493
General Technical | Jaspreet Chahal

Unzip files in bulk in their own directory (sh)

Here is a quiz tip to unzip several zip files found in a directory to their own directories. Use this command from the folder where zip files are to be found [crayon-56594017a08fd007369171/] To make sure that output folders will be created as per required, let's print unzip commands with an echo using the command below [crayon-56594017a091c067095610/] I hope this helps, if you come across some other way, please share it with others. … [Read more...]

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-56594017a2620472115392/] Once you are done with above command you will see something like this Output [crayon-56594017a2638934873659/] 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-56594017a264b599111993/] Let's now update the package list by using the command below [crayon-56594017a265b186639123/]   Next We install MongoDB by issuing the command below [crayon-56594017a266e417573156/] 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-56594017a2680833334891/] 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-56594017a3a12325056187/] Then I have this CSS that applies to the editor element CSS [crayon-56594017a3a2b683317689/] 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-56594017a3a3d201272261/] 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-56594017a3a50604966512/] 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-56594017a3a61701159975/] 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-56594017a4c4b615223631/] 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-56594017a4c6b158645144/] 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-56594017a5770740708199/] 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-56594017a578a270492359/] So to do that you will run this command [crayon-56594017a579b925625509/] Considering that all you files are under /home/crt/2014 folder our final VirtualHost confg will look like this   [crayon-56594017a57ac471871860/] 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-56594017a65f3301089040/] 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-56594017a660f560818440/] Then we are connection to our object store [crayon-56594017a6620996683233/] Then we are getting hold of object list where name or an object starts with "hello" [crayon-56594017a6631866648937/] 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-56594017a6644801557387/] 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-56594017a87a0084528106/] 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-56594017a87cc799735146/] 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-56594017a984f053542833/] 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...]