SSL certificate problem, verify that the CA cert is OK Windows AWS

October 23, 2014

It’s a pretty common problem in Windows, curl used to include a list of accepted CAs, but no longer bundles ANY CA certs. So by default it’ll reject all SSL certificates as unverifiable. You need just to set cacert.pem to curl.cainfo. Since PHP 5.3.7 you could do: 1.download http://curl.haxx.se/ca/cacert.pem and save it somewhere. 2.update php.ini […]

Javascript toggle show/hide div or anything

October 14, 2014

You would manipulate the elements by toggling between styling rather than changing the elements based on the innerHTML. In this case, you would toggle between display:none and display:block. Example:

jQuery(…).datepicker is not a function

October 7, 2014

The are several reasons for this error: 1.The jquery.ui is used before jquery. 2.The $ is used by another library. 3.The jquery lib that is referenced locally(wordpress) has different version from that using jquery.ui. 4.When the right library and version is referenced the browser cache must be cleared.

Eclipse pdt install javascript checker – JSHint

October 1, 2014

JSHint Eclipse is available in the Eclipse Marketplace. The easiest way to install it is to drag the icon on the start page into your Eclipse. You can also install jshint-eclipse directly from this update site: http://github.eclipsesource.com/jshint-eclipse/updates/ In the Eclipse main menu, click: Help > Install New Software… Enter the URL above and select JSHint […]

PHP convert none png image to png format using GD

September 25, 2014

Based on what kind of image it is you could select the correct function to open the file. Then, you just need imagepng() to convert. Example:

PHP resize image using ratio

September 25, 2014

To maintain the aspect ratio of your original image, calculate the factor by which you have to resize the image in the vertical and horizontal direction. Example, resize image to 1920 max width or max height

PHP get image width & height

September 25, 2014

To get the width and height of the image use getimagesize(path_name), this function returns the array which contains the height, width, image_type constant and other image related info. By the following code you can achive that. See also PHP resize image using ratio

Eclipse auto indent, auto formatting, auto alignment shortcut

September 25, 2014

Ctrl+Shift+F to invoke the Auto Formatter Ctrl+I to indent the selected part (or all) of you code. To format it automatically when you save the file, then Goto Window > Preferences > Java > Editor > Save Actions and configure your save actions. Along with saving, you can format, Organize imports,add modifier ‘final’ where possible […]

Ubuntu install PHPMyAdmin

September 18, 2014

  Type the following line in terminal: #sudo apt-get install phpmyadmin Package configuration – when asked which web server to use, select apache or lighthttpd – When asked “Configure database for phpmyadmin with dbconfig-common”? Choose “Yes” – Next key in “Password of the database’s administrative user:”. This is password for MySQL that you set during […]

Linux how to exit man page

September 18, 2014

After finished reading a man page manual, press “q” on your keyboard to quite or exit the page. Linux manual pages can be easily accessed via the terminal by typing man program-name. Manual or info page navigation can be accomplished by using the up and down arrow keys or in some cases, by pressing enter for more Once your finished viewing a […]