Skip to main content

Posts

Showing posts from July, 2015

Image magick crop image 2, convert image to pdf

This command crop all image at size 720x1100 out of original mobile 720x1280 (vertical). This often happen when you take screen shot in mobile device, it also show header of image like android status bar... You also can enter fullscreen mode in mobile before take screenshot but it take time and u can't do in all situation. for file in *.jpg; do convert -crop 720x1100+0+180 $file  $(basename $file .jpg)_croped.jpg; done - for file in *.jpg: loop through all jpg file in current folder. - convert : one of imagemagick command - -crop (crop image) - 720x1100: size to crop - +0+180 : start position to crop: here i crop about 180pixels bellow header. - basename : bash function to get name of filename (eg: extension .jpg) after  Convert image to PDF: http://catlingmindswipe.blogspot.com/2013/11/how-to-convert-jpg-to-pdf-using.html http://catlingmindswipe.blogspot.com/2013/11/how-to-convert-jpg-to-pdf-using.html (Note: this task may be take time because

Commands 2

How To Create a New User and Grant Permissions in MySQL Tags:  MySQL What the  Red  Means The lines that the user needs to enter or customize will be in  red  in this tutorial! The rest should mostly be copy-and-pastable. About MySQL MySQL is an open source database management software that helps users store, organize, and later retrieve data. It has a variety of options to grant specific users nuanced permissions within the tables and databases—this tutorial will give a short overview of a few of the many options. How to Create a New User In  Part 1 of the MySQL Tutorial , we did all of the editing in MySQL as the root user, with full access to all of the databases. However, in the cases where more restrictions may be required, there are ways to create users with custom permissions. Let’s start by making a new user within the MySQL shell: CREATE USER ' newuser '@'localhost' IDENTIFIED BY ' password '; Sadly, at this point newuser has no