Firefox on CentOS7 does not have Flash enabled by default. How to install Flash Player plugin on CentOS 7? You may follow this tutorials to build a freshwrapper based flash plugin for Firefox on CentOS 7. If you don’t want to build it by yourself, you may download the pre-built .so from from this repository.
Category: QA
Questions and answers.
rtl8192cu driver for CentOS 7
Posted onI find the rtl8192cu wireless adapter driver on CentOS 7 is quite unstable. After running a while, the connection will disappear. How to make it stable? There is a bug in some hardware where the device never wakes back up. You may try disabling the power management by putting a file 8192cu-disable-power-management.conf under /etc/modprobe.d/: #
Read more
How to install aclocal on Fedora Linux?
Posted onI tried to build a project while it reports: # ./autogen.sh Can’t exec “aclocal”: No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory How should I handle this? How to install aclocal? yum install aclocal shows: No package aclocal available. Error: Unable to find a
Read more
How to add two static IPs for a Xen VM?
Posted onHello, I have installed Xen4Centos on Centos7, having single NIC card with bridge network and have two VMs on that. In one VM, I want to add two static IP one for webserver and one for mail server. So I have created IP alias in guest VM, it was created but it was not pinging
Read more
How to install PARSEC correctly.
Posted onPARSEC is the most important CPU-bound benchmark for systems. It is huge and hard to install because it needs lots of 3-part libs. PARSEC download link for 3.0 version: http://parsec.cs.princeton.edu/download.htm#parsec I remembered I added the answer yesterday night but I could not see the answer currently. Anyway, let me add the answer again after I
Read more
How to install NAS benchmark
Posted onNAS benchmark link: http://www.nas.nasa.gov/publications/npb.html For Ubuntu, remember to install gfortran (sudo apt-get install gfortran) and change config/make.def to install NAS benchmark. Other distros are similar.
Allowing root Access to NFS Directories
Posted onFor local filesystems, root usually has full access (read/write) to directories/files inside of it. But for NFS directory mounted from network, root usually has no permission to write to directories or files within the NFS directory. How to make root act similarly in an NFS directory to the behavior in local directories? The reason that
Read more
Why I got message “invalid syntax, continuing…” when I execute “sysctl”?
Posted onWhen I tried to apply new configuration in /etc/sysctl.conf, I got following message. warning: /etc/sysctl.conf(44): invalid syntax, continuing… Sounds like your changed /etc/sysctl.conf has problem. You may post the content of your /etc/sysctl.conf here to let other have a check. net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1
Read more
How to install glibc, glibc-common and GD libraries independently?
Posted onI already have PHP and nginx installed and running on my on centOS 6.7. Please guide me, how can install glibc, glibc-common and GD libraries independently on my centOS 6.7 without crashing my system? I am not sure how you installed PHP and nginx. If they are installed from CentOS6.7’s Yum repository, you may install
Read more
In Vim, are there shortcuts to set tab widths to 2 and 4?
Posted onTab widths may be different for different languages. Even with a common language, the tab width settings can be different for different projects. In Vim, are there shortcuts to set tab widths to 2 and 4? To quickly change the tab widths when changing projects. I am afraid no. But you create shortcuts for setting
Read more
In Golang, how to convert a string to unicode rune array and back?
Posted onIn Golang, how to convert a string to unicode rune array and do the reverse way? Convert string s to a rune array: runes := []rune(s) Convert a rune array runes to string: str := string(runes)
In Golang, how to print string to STDERR?
Posted onIn Golang, the fmt.Println() is convenient to print to STDOUT. But how to print string to STDERR? In Go os package, “Stdin, Stdout, and Stderr are open Files pointing to the standard input, standard output, and standard error file descriptors.” So, you can use the WriteString function on File on os.Stderr to print string to
Read more
Converting Error to String in Go Lang
Posted onIn Golang, fmt.Println(err) can print out the error err. But how to convert an error to a string explicitely? In Go, the error type is an interface type that has an interface type error interface { Error() string } An error variable represents any value that can describe itself as a string. Ref: https://golang.org/pkg/builtin/#error So,
Read more
How to convert the dmesg timestamps to easier to read format on Linux?
Posted onThe dmesg results from newer Linux kernels show the timestamps. It seems the time in seconds since the kernel start time. How to convert the dmesg timestamps to the real time on Linux? The dmesg timestamp is the time in seconds since the kernel starting time. Later dmesg has an -T option: -T, –ctime Print
Read more
In Node.js, how to import functions from another JavaScript file?
Posted onIn Node.js, how to import functions from another JavaScript file like source common.sh in Bash? In the .js file to be imported such as ‘common.js’, organize functions to be exported like module.exports = { func1: function () { // func1 impl }, func2: function () { // func2 impl } }; In the other .js
Read more
How to process a file line by line in Go?
Posted onIn the Go programming language, How to process a file line by line? An equivalent piece of Bash code could be while read line ; do echo $line done < ./input.txt You can make use of the bufio package’s Scan(). // open the file filepath f := os.Open(filepath) // create a scanner fs := bufio.NewScanner(f)
Read more
How to create a Reader from a string in Go?
Posted onIn Go, how to create a Reader from a string? Many APIs use a Reader as its input. In Go, the strings.NewReader(s) library function creates a Reader from a string. Check the doc at: https://golang.org/pkg/strings/#NewReader
How to grep a tab on Linux?
Posted onHow to grep a tab on Linux? Including ‘t’ seems not working. grep can grep tabs. The problem is likely the tab is not passed to grep. If you are using Bash, you can use ANSI-C quoting to pass the “tab” to grep: $ grep $’t’ file.txt Or, use Perl-style regex (only for GNU grep)
Read more
How to get the full path and directory of a Makefile itself?
Posted onHow to get the full path and directory of a Makefile itself like finding Bash script’s own path? This 2 lines in Makefile get the full path and dir of the Makefile itself: mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) mkfile_dir := $(dir $(mkfile_path)) The piece of code gets you Makefile, finds its absolute path and the
Read more
Where are the Start menu files in Windows 10?
Posted onWhere are the Start menu files actually stored in Windows 10? There are two folders for the startup menu for Windows: Per-user Start menu: %userprofile%AppDataRoamingMicrosoftWindowsStart Menu All user’s Start menu: %programdata%MicrosoftWindowsStart Menu