I have a binary file. If I open it with vi, it shows sequences of human-readable text and binary characters. What is the best way to extract the human-readable portion only using Bash? I was thinking, maybe we can do this over a grep or sed pattern? Answer Use the strings utility – that’s exactly …
Ruby On Rails Fails on Fresh Ubuntu, Mint, and Fedora Because of Debug inspector failing
I have tried in the last week with a fresh copy of Linux mint 18 Ubuntu 16.04 and fedora 24?(the latest one). All 3 give me the error with debug inspector. xjackparsons93@93 ~/ty $ bundle install This problem is not affecting my MacBook Pro only linux boxes Answer This can help you: If you have issues, first …
Bash debug calling stack
I’m using a generic procedure to trap and describe the error or abnormal situations, instead of the usual ‘2>…’ error construct. The idea will be to have a procedure like this simplified version: and then, used as in this example: The issues are: BASH_SOURCE is the running source. T…
Create a heredoc that doesn’t interpret anything
I’m writing a script for a friend who is not experienced with bash. The script generates a backup script, generates a crontab and runs crontab to create a cron job. I want to date these backups, so currently the script (what’s relevant) is: This, however, generates finalCutScript.bash with the dat…
test kitchen stuck on “creating virtual machine”
Running chefdk on Windows 10 with hyperv. I can use kitchen create to create Windows VMs and it works fine but I just tried a Linux VM and I’m getting this errror: Now it does create a VM which I can manually ssh into via PuTTY or from cmd via openssh for Windows so I don’t know why its hanging-
How to avoid defunct python processes in Linux?
With python3 (3.4.3) on Ubuntu 14.04 I have created a Forker class which I use in two different processes to create child processes. Here is the Forker class: In the two different Linux processes I derive from this class and then call e.g. something like: However, I still get a couple of defunct python proces…
Docker-compose – mongodb could not be authenticated
After installing Docker Toolbox on Windows 10 and starting docker-machine, I run docker-compose up, I run into this error: The following packages cannot be authenticated mongodb-org-shell The code in the dockerfile: RUN apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv EA312927 RUN echo &…
PHP Xdebug Netbeans Breakpoints
After working fine, with no config changes for months xdebug/netbeans is now useless. I can create breakpoints but whenever it has ‘stepped in’ to a further scope its impossible to step thru and simply jumps out of the inner scope to the caller. There are no exceptions generated. Using tail -f xde…
Apache Access Control to IPs (X-Forwarded-For) or valid-user
I used to block access to certain folder of my Apache server using valid-user or ip directive, like the following: Now, I have placed my server behind an F5-BIGIP device which won’t let me fully DNAT client’s connections. The device is also behind a Linux server that serves as gateway with DNAT/SN…
how to keep a subprocess running and keep supplying output to it in python?
I am not able to keep alive a tunnel created by subprocess to fire multiple commands. first i tried this to execute a subprocess then i tried this in first case it executes the commands and then exits the gdb making it impossible to keep suplying commands to gdb and in second case it does not execute after b …