apt-get install tzdata noninteractive

This is the script I used (Updated Version with input from @elquimista from the comments) #!/bin/bash ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata dpkg-reconfigure –frontend noninteractive tzdata Seems to work fine. As one liner: DEBIAN_FRONTEND=noninteractive apt-get install -y –no-install-recommends tzdata

While I am debugging PHP Script in Eclipse, it doesn’t load mysql extension

after struggling with this issue for several hours today, I decided to manually cat all informations inside one single .ini file, and started eclipse with eclipse -clean. something like the following script should do the trick: #!/bin/bash mkdir /etc/php5/cli_eclipse cat /etc/php5/cli/php.ini /etc/php5/conf.d/* > /etc/php5/cli_eclipse/php.ini (you could obviously check if the dir is already existing etc. … Read more

Want to know the ESSID of wireless network via C++ in UBUNTU

You should set length properly first before using werq, check this, int sockfd; char * id; id = new char[IW_ESSID_MAX_SIZE+1]; struct iwreq wreq; memset(&wreq, 0, sizeof(struct iwreq)); wreq.u.essid.length = IW_ESSID_MAX_SIZE+1; sprintf(wreq.ifr_name, IW_INTERFACE); if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { fprintf(stderr, “Cannot open socket \n”); fprintf(stderr, “errno = %d \n”, errno); fprintf(stderr, “Error description is … Read more

Howto split a string on a multi-character delimiter in bash?

Since you’re expecting newlines, you can simply replace all instances of mm in your string with a newline. In pure native bash: in=’emmbbmmaaddsb’ sep=’mm’ printf ‘%s\n’ “${in//$sep/$’\n’}” If you wanted to do such a replacement on a longer input stream, you might be better off using awk, as bash’s built-in string manipulation doesn’t scale well … Read more

How to use debug libraries on ubuntu

TL;DR: Install libwebkitgtk-3.0-0-dbg , then you have the necessary debug symbols. ##For debug symbols, you don’t usually have to install from source. As you know, to get debug symbols for software you’re building yourself, you can run GCC with -g. For software installed through your operating system’s package manager (which includes libwebkitgtk-3.0-0, here), at least … Read more

org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. Build info: version: ‘unknown’, revision: ‘unknown’

This error message… 2018-08-31 09:16:26,570 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /crawlerClass/myCrawler/5922: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. …implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session. Your base exception is the org.openqa.selenium.WebDriverException as your program … Read more

getrandom syscall in C not found

getrandom and getentropy were added to glibc in version 2.25. As of July 2017, most Linux distributions have not yet updated to this version (e.g. Debian’s most recent release, which just came out, has 2.24) but they should soon. Here is how to use the glibc wrappers if available and fall back to the raw … Read more