I have a PDF file that has some images in it. How to extract the images out (not snapshot/screenshot of the page areas) from PDF on Linux? 2 tools that I usually use for extracting and saving images from PDF files: pdfedit and libreoffice. You can open the PDF file by the tools, right click
Read more
Tag: Tutorial
Firefox: how to sync bookmarks saved on iOS devices to Firefox on PC?
Posted onFirefox on iOS can view bookmarks from PC. But how to sync the bookmarks made on iOS to PC? It seems the bookmarks made in Firefox on iPhone is local only. No, you can’t yet. Bookmarks saved on your iOS devices will not sync to your PC at current (by Nov. 25, 2015) version of
Read more
iOS contacts searching does not work showing “No result”
Posted onAfter upgrading to iOS 9.1, my iPhone contacts searching does not work showing “No results”. How to fix it? The trick is to create a group in your contacts. However, you can not do it on your iPhone. But there is a method: Sync your iPhone contact with iCloud (so you will need to enable
Read more
Maximum number of mmap()’ed ranges and how to set it on Linux?
Posted onWhat’s the maximum number of mmap()‘ed ranges that a process can makes and how to set the limits on Linux? I have a program that mmap()s and mprotect()s lots ranges. After allocating many ranges, mprotect() starts to fail with ENOMEM error number. From the man page, ENOMEM means 2 possible problems: ENOMEM Internal kernel structures
Read more
How to disable laptop’s internal keyboard on Linux?
Posted onI connect a USB keyboard to my laptop so the internal keyboard is not used anymore. But I may press some keys by accident. How to disable the laptop internal keyboard? I am working on Linux. This post introduces how to disable laptop’s internal keyboard on Linux: How to Disable and Enable Laptop Keyboard in
Read more
How to watch a directory size in Linux Shell
Posted onHow (only) to show the size of the directory. LS command may show more trivial infos I don’t need. DU command can do it. DU is “du – estimate file space usage”. Users could use ‘–max-depth=N’ parameter to print the level of information. One example is as follows. $ du -h –max-depth=0 hummer-svn 11G hummer-svn
How to keep master thesis safety and availability on Windows
Posted onWhen you write your master thesis (in Chinese) on windows, you may have following worries. a, Be afraid your master thesis is lost (or can not be accessed) when hard disk/udisk is broken (or something other viruses). b, Keep master thesis availability (7×24) and safety. c, Do not want anyone else to access it before
Read more
How to configure ifcfg-eth0 network scripts on Fedora/RHEL Linux?
Posted onHow to configure the ifcfg-* network script files under /etc/sysconfig/network-script/ on Fedora/RHEL Linux? Following is a very typical ifcfg-eth0 file setting static IP/gateway/network mask: DEVICE=eth0 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.0.0 IPADDR=192.168.1.151 GATEWAY=192.168.1.10 USERCTL=no More options are supported, here you can find a reference: Interface Configuration Files (a easier to read PDF from F15 doc).
How to convert tiff images from RGB color to CMYK color on Linux?
Posted onI have a poster to be submitted to the publisher which requires image files in CMYK color. The file I already have is in RGB color. How to convert it on Linux? The convert tool from ImageMagick with option -colorspace to alternate image colorspace of images. The plain output with colorspace is quite large. So
Read more
How to change the DPI of tiff images exported by PowerPoint?
Posted onThe DPI of the tiff images exported by PowerPoint seems 96. For posters, larger DPIs like 150 or 300 are needed. Is it possible to change the DPI of tiff images exported by PowerPoint? In the options of PowerPoint, there is a setting for choosing DPIs. However, it have no effect. Check the post on
Read more
How to do diff like `git diff –word-diff` without git on Linux?
Posted onThe result of git by git diff –word-diff is great. But how to do diff like git diff –word-diff without git on Linux? The plain diff command on Linux seems not accept options like –word-diff. The wdiff is for word-diff: wdiff program is a front end to diff for comparing files on a word per
Read more
How to convert PDF to text with format kept on Linux?
Posted onHow to convert PDF to text with format kept on Linux? Many of the formatting in PDF will not be available in text. But better keep the text’s relative positions as the same. For example, the table columns should be kept. The pdftotext tool can convert PDF to text pretty well: pdftotext – Portable Document
Read more
How to install driver for TP-LINK T2U wifi adapter on Linux?
Posted onHow to install driver for TP-LINK T2U wifi adapter on Linux? I am using Fedora Linux 22. The kernel module for the driver for TP-LINK T2U is “mt7650u_sta”. TP-LINK and mediatek provide drivers (mediatek one is for 7610u). But neither work for Fedora 22 AFAIK. This piece of modified driver work for me on Fedora
Read more
How to pass results from the opened window to the openning window in JavaScript?
Posted onFrom the opening window by JavaScript window.open(), we can pass info to the opened by hash. But how to pass results back from the opened window to the openning window in JavaScript? Assume in the opener window, a JavaScript variable is defined like var exchangeVar = ”; In the opened window, you can update the
Read more
How to capture the close event of an opened window by window.open() in JavaScript?
Posted onHow to capture the close event of an opened window by window.open() in JavaScript? This JavaScript code works well for me: var newwindow = window.open(“/newwindow.html”); newwindow.onbeforeunload = function () { // processing event here alert(“new window closed”); } Note that after the callback function is executed, the newwindow is closed.
How to convert an object to json in Node.js?
Posted onHow to convert general JavaScript objects to json in Node.js? Assume jo is a JavaScript object, you can convert it to a json string by: JSON.stringify(jo)
Auto Pressing Multiple Keys Together in Linux
Posted onThis post introduces a key presser on Linux with xvkb. But how to simulate pressing multiple keys together on Linux? That is, I would like to have multiple keys such as “A” “B” “C” “D” pressed together and being hold. How to simulate this on Linux with programs/commands? You can make use of xdotool (xdotool:
Read more
How to cut by multiple spaces in Linux?
Posted onHow to cut by multiple spaces in Linux? For example, if I get a string like a b c d where the spaces among the fields are not decided. How to get the four fields a, b, c and d out? Here, we take getting ‘b’ (the 2nd field) as the example. You can first
Read more
How to install Chrome on Fedora Linux?
Posted onHow to install the Chrome browser on Fedora Linux from Google? Google provides a repository for yum/dnf on Fedora. First, following http://www.systutorials.com/3471/additional-repositories-for-fedora-linux/#google-chrome-repository to add Google Chrome repository. Then, you can install Google Chrome by yum/dnf: # dnf install google-chrome-stable
How to send POST request in JavaScript?
Posted onHow to send POST request in JavaScript from the users’ browsers? One easy method I find is to use the jQuery library’s post() method. Here is one example that send POST request with data “file: filename” to the “/fileview” URL on the server and show the replied data: $.post(“/fileview”, {file: filename}, function (data) { //
Read more