Install Docker Toolbox on a Mac via command line

Deprecation Warning Docker Toolbox and Docker Machine have both been deprecated. Docker Desktop is the officially recommended replacement. Original Answer I found that Docker Toolbox is available via brew/cask # Install Homebrew ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” # Install Cask brew install caskroom/cask/brew-cask # Install docker toolbox brew cask install docker-toolbox Once Docker Toolbox is … Read more

Dead code detection in legacy C/C++ project [closed]

You could use a code coverage analysis tool for this and look for unused spots in your code. A popular tool for the gcc toolchain is gcov, together with the graphical frontend lcov (http://ltp.sourceforge.net/coverage/lcov.php). If you use gcc, you can compile with gcov support, which is enabled by the ‘–coverage’ flag. Next, run your application … Read more

Automating running command on Linux from Windows using PuTTY

Putty usually comes with the “plink” utility. This is essentially the “ssh” command line command implemented as a windows .exe. It pretty well documented in the putty manual under “Using the command line tool plink”. You just need to wrap a command like: plink root@myserver /etc/backups/do-backup.sh in a .bat script. You can also use common … Read more

headless internet browser? [closed]

Here are a list of headless browsers that I know about: HtmlUnit – Java. Custom browser engine. Limited JavaScript support/DOM emulated. Open source. Ghost – Python only. WebKit-based. Full JavaScript support. Open source. Twill – Python/command line. Custom browser engine. No JavaScript. Open source. PhantomJS – Command line/all platforms. WebKit-based. Full JavaScript support. Open source. … Read more

Don’t make me manually abort a LaTeX compile when there’s an error

With MikTeX, pdflatex has this command-line option: -interaction=MODE Set the interaction mode; MODE must be one of: batchmode, nonstopmode, scrollmode, errorstopmode. Edit suggested by @9999years: Those values are equivalent to a set of LaTeX \commands that provide the same functionality. From TeX usage tips: The modes make TeX behave in the following way: errorstopmode stops … Read more

What is test harness?

Several broad questions there, will try to answer based on my experience. Think of a Test Harness as an ‘enabler’ that actually does all the work of (1)executing tests using a (2)test library and (3)generating reports. It would require that your test scripts are designed to handle different (4)test data and (5)test scenarios. Essentially, when … Read more

.doc to pdf using python

A simple example using comtypes, converting a single file, input and output filenames given as commandline arguments: import sys import os import comtypes.client wdFormatPDF = 17 in_file = os.path.abspath(sys.argv[1]) out_file = os.path.abspath(sys.argv[2]) word = comtypes.client.CreateObject(‘Word.Application’) doc = word.Documents.Open(in_file) doc.SaveAs(out_file, FileFormat=wdFormatPDF) doc.Close() word.Quit() You could also use pywin32, which would be the same except for: import … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)