Author Archive
Posted by jpluimers on 2016/07/01
DNS and Mac OS X are a bit of a tricky situation as OS X can use more than the default DNS servers: its resolve can do a multi-client DNS search.
The default DNS servers can be listed like this:
scutil --dns | grep 'nameserver\[[0-9]*\]' | sort | uniq
The effective DNS server like this:
dig whoami.akamai.net | grep "^;; SERVER" | cut -c 12-
Sometimes you want to know if you have manually configured DNS servers, or only DHCP assigned ones. This statement shows that for my Wi-Fi network-service:
networksetup -getdnsservers Wi-Fi
Because of the multi-client setup, you need to run this for all network-services configured on your OS X installation. You can get the list like this:
networksetup -listallnetworkservices
I’ve not yet found a way to list only active services, as the networksetup documentation indicates the -listnetworkserviceorder option will mark inactive ones with (*), but it reality does so only for disabled ones. So this does not work:
networksetup -listnetworkserviceorder
I might one day dig into combining the output of ifconfig with networksetup to figure out a shell based solution to this question.
–jeroen
Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, Power User | Leave a Comment »
Posted by jpluimers on 2016/07/01
Very interesting question and answers: windows 7 – Available memory differs by several GiB from what is installed – Super User.
Basically the missing memory can be due to:
- Windows licensing limitations
- Mapping of device memory into virtual memory space (especially on x86 systems)
This affects both server and client versions of Windows. Client versions are more restrictive because of the vast amounts of potentially faulty drivers involved.
Some links (read the full question for details):
–jeroen
Posted in Power User, SysInternals, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows NT, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2016/06/30
I’ve seen this compiler error in Delphi XE8 and others in Delphi XE6 and XE7 using a project depending on the built-in FastReports:
F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions
This will probably fail in more recent versions as well.
The easiest workaround is this:
- Fast Report XE6 (4.15.10)
- Fast Report XE7 (Version 5.1.5)
- Fast Report XE8 (Version 5.2)
The problem could be solved with help of technical support (Paul Gursky).
The solution is to remove all pas files from:
- LibD20 (XE6)
- LibD21 (XE7)
- LibD22 (XE8)
- LibD22x64 (XE8)
The above is paraphrased from Fast Reports forum > Fatal Error F2051 when compiling under Delphi XE6 and XE7
The core of the problem is that Fast Reports stores .dcu/.hpp/.pas files in the same directory whereas Delphi itself stores the .dcu/.hpp/.o files in one directory (actually usually in debug and release directories for each supported platform like win32, win64, etc).
Note: the built-in Fast Reports limits a few features, for instance export to Excel is not supported.
–jeroen
Posted in Delphi, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2016/06/29
This is a small discussion of about 1 year old on G+ An interesting power/tech thing….
It serves as a reminder to myself: how far is the gigafactory and when will battery prices really drop.
–jeroen
Posted in LifeHacker, Power User | Leave a Comment »
Posted by jpluimers on 2016/06/29
Every once in a while I do Command-line Building With csc.exe.
When building libraries, it throws this error:
The reason is that by default it wants to build a program.
Change this default by adding the /target:library parameter.
–jeroen
via: c# – Program does not contain a static ‘Main’ method suitable for an entry point – Stack Overflow.
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/06/28
At first you’d think that gists can only hold text files. That’s not true, and I hinted to this last week in Hosting an HTML gist containing JavaScript.
As gists are git repositories, you can put any file in it through git, even binary files, though the gist UI nor a lot of the tools – including gist(1) – support uploading binary files in a gist.
This post – though old, so the screenshots are not current any more, but the commands still are current – explains how to clone the gist and add binaries (in this case images): How To Upload Image / Binary File to Gist | Hanxue and IT
This is for instance how I created a gist containing openssl Darwin binaries to help solve https://github.com/drwetter/testssl.sh/issues/362.
–jeroen
Posted in Development, DVCS - Distributed Version Control, gist, git, GitHub, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/06/28
The below batch file finds and runs the latest vsvars32.bat on a system.
vsvars32.bat initializes the path and other environment variables to run Visual Studio and command-line tools (like csc.exe, xsd.exe, editbin.exe).
The batch file employs a few tricks from:
:: Run the most recent vsvars32.bat
:: test these environment variables that have 110 or 120 in them (future enhancements: support more Visual Studio versions):
:: Visual Studio .NET 2002: VS70COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET\Common7\Tools\
:: Visual Studio .NET 2003: VS71COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
:: Visual Studio 2005: VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
:: Visual Studio 2008: VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
:: Visual Studio 2010: VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
:: Visual Studio 2012: VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
:: Visual Studio 2013: VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
:: VS130COMNTOOLS was skipped: http://www.neowin.net/forum/topic/1215607-visual-studio-13-to-be-skipped-vnext-to-be-v14/
:: Visual Studio 2015: VS130COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
:: They contain `vsvars32.bat` which will update the `PATH` so it includes where `xsd.exe`, `csc.exe`, `editbin.exe` and others reside
:: Different examples: https://github.com/noop-dev/c-cgdk/blob/master/compile-vscpp.bat
:: and https://code.google.com/p/xvid4psp/source/browse/trunk/bin/4Gb+patcher.bat
:: or give it a go for any version: http://chess.eecs.berkeley.edu/ptexternal/src/ptII/ptolemy/actor/lib/fmi/fmus/template/sources/build_fmu.bat
setlocal enabledelayedexpansion
:: delayed expansion allows for the exclamation marks
:: see http://ss64.com/nt/delayedexpansion.html
:: see http://stackoverflow.com/questions/22857407/windows-batch-how-to-assign-variable-with-dynamic-name
for %%v in (70 71 80 90 100 110 120 130) do if not [!VS%%vCOMNTOOLS!]==[] set VSCOMNTOOLS=!VS%%vCOMNTOOLS!
:: http://stackoverflow.com/questions/28682268/assign-variables-past-endlocal-in-a-loop
endlocal & call :do call "%VSCOMNTOOLS%vsvars32.bat"
goto :eof
:do
echo %*
%*
goto :eof
–jeroen
via: Finding the path of xsd.exe from your Visual Studio Build Events « The Wiert Corner – irregular stream of stuff.
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Development, Software Development, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/06/27
I figured that both gmail and photos take up the largest parts of my Google storage, so I did some cleaning.
You can figure out which part of your Google storage is used by email using https://www.google.com/settings/storage
Still people send huge BMP screenshots to me (probably Microsoft will never learn that pasting clipboard screenshots can be done just as well using PNG format?), so I started searching for mails with large attachments that GMail introduced a while ago:
older_than:1y size:10m
This will include mails of 10 megabyte and larger (so size is a minimum size, not an exact size) that are older than one year.
Then I deleted irrelevant mails notifying the people they should have converted their BMP files to PNG as they take up lots of space on their end as well.
Then storage didn’t decrease, as the messages were still in the trash:
in:trash
Luckily from there, you can empty the trash from there.
–jeroen
Posted in GMail, Google, Power User | Leave a Comment »