Wednesday, 15 June 2016

autoconf, check arguments

If you used several arguments to configure your source:
$ ./configure --disable= etc....

Later you can print the build arguments with:
$ ./config.status --config

Tuesday, 31 May 2016

Windows 10 DirectX debug layer issue

Visual Studio lack of support DirectX 11 Debug layer. You can fix it:

- HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU 
UseWUServer set to zero

-Restart Windows
-Install Graphics tool
-Settings/System/Apps&Features/ManageOptionalFeatures/AddFeature/GraphicsTools

Friday, 13 May 2016

Proper partitioning WD Red 4T disk

I partitioned my disk in NAS by the following way:

parted /dev/sdc


at the parted prompt 

mklabel gpt mkpart primary ext4 4096s 100%

align-check opt 1

quit


Formating the drive:

mkfs.ext4 -L lia_store /dev/sdb1

reboot

Friday, 22 April 2016

Asus RT-N66U random wifi disconnect fix

A bought a N66U wireless router that works perfectly while I started upgrading the firmware. I met a problem mentioned in title different time interval (there were 10 minutes or 1hour not dependent the throttling). My first think about the heating problem but the extra fan don't solved my issue.
After a long search I a find a solution that fix my problem: Under Advanced Settings/Wireless I had to turn off the "Optimized for Xbox" option.

Friday, 18 March 2016

Remove VS2015 git provider

I was unable to disable VS git provider. When set to 'None' in options at restart of VS it was enabled.

You can totally disable in regedit:
 
Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config\SourceControlProviders
 
Delete 11b8e6d7-c08b-4385-b321-321078cdd1f8 This one is the GitProvider but you can delete other ones.

Friday, 12 February 2016

Git disabe auto gc

I saw several times the following message from git: "Auto packing deferred; not on AC". This is very annoying because of the Google Repo tool for Windows create symbolic link to the git folders and this one block to use the 'git gc' command. You can disable permanently the working of gc: git config --global gc.auto 0

Monday, 8 February 2016

Quick search of missing Linux developer package

There is a little trick to find that library which is missing: e.g.: You get the next error at compile: fatal error: X11/Xlib.h: No such file or directory I always forgot which package should I install but this little application can help me out the problem: apt-file search Xlib.h Sometime you have to install manually the apt-file package too.

Saturday, 6 February 2016

NAS tcp tuning

I found some article that set up for low-latency general purpose network desktop.
This settings keep until reboot.

$ su
$ echo 12582912 > /proc/sys/net/core/rmem_max
$ echo 12582912 > /proc/sys/net/core/wmem_max
$ echo '10240 87380 12582912' > /proc/sys/net/ipv4/tcp_rmem
$ echo '10240 87380 12582912' > /proc/sys/net/ipv4/tcp_wmem
$ echo 32768 > /proc/sys/net/core/netdev_max_backlog

On NAS the previous settings decrease the number of this kind of messages from dmesg:

TCP: Peer xxx.yyy.191.66:8153/4109 unexpectedly shrunk window 735219438:735220878 (repaired)
TCP: Peer xxx.yyy.191.66:8153/4109 unexpectedly shrunk window 735219438:735220878 (repaired)

Git performance hacks on Windows

I also meet the git issue about performance. There're some option that can help a little bit: 

$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256
 

Thursday, 28 January 2016

Visual Studio 2015 skip stl::* stepInto

I found a solution on the net to skip the entering into VS stl templates:

You should edit this file:
c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\default.natstepfilter

By default defense the UAC and readonly, but you can replace this file. This file is an XML and add the following line between <StepFilter /> tag:

  <Function>
    <Name>std\:\:.*</Name>
    <Action>NoStepInto</Action>
  </Function>

Start VS and test it. There is an interesting of this solution stop in stl template if you put a breakpoint. After I removed it the filter works like a charm.

Wednesday, 27 January 2016

Visual Studio heap corruption debug

I found a practically code to enable debug the heap overrun:

#ifdef _DEBUG // enable CRT memory leak detection & report
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF // enable debug heap allocs & block type IDs (ie _CLIENT_BLOCK)
// | _CRTDBG_CHECK_CRT_DF // check CRT allocations too
// | _CRTDBG_DELAY_FREE_MEM_DF // keep freed blocks in list as _FREE_BLOCK type
| _CRTDBG_LEAK_CHECK_DF // do leak report at exit (_CrtDumpMemoryLeaks)
// pick only one of these heap check frequencies
// | _CRTDBG_CHECK_ALWAYS_DF // check heap on every alloc/free
| _CRTDBG_CHECK_EVERY_16_DF
// | _CRTDBG_CHECK_EVERY_128_DF
// | _CRTDBG_CHECK_EVERY_1024_DF
//| _CRTDBG_CHECK_DEFAULT_DF // by default, no heap checks
);
int mode = _CRTDBG_MODE_WNDW;
//int mode = _CRTDBG_MODE_DEBUG;
_CrtSetReportMode(_CRT_WARN, mode);
_CrtSetReportMode(_CRT_ERROR, mode);
_CrtSetReportMode(_CRT_ASSERT, mode);

// _CrtSetBreakAlloc (209) ; // break debugger on numbered allocation
// // get id number from leak detector report of previous run
#endif

Tuesday, 5 January 2016