Convert Audio to Video with Image via Command Line
article #1367, updated 3 days ago

Very simple via ‘ffmpeg’, there are versions for all major platforms:

ffmpeg -i your.mp3 -i picture%d.jpg out.avi

Categories:      

==============

When Outlook won't connect, when autodiscover fails, when it cannot set up an encrypted connection
article #1366, updated 3 days ago

Registry deletions! Try this:

https://docs.microsoft.com/en-us/outlook/troubleshoot/domain-management/unexpected-autodiscover-behavior

Categories:      

==============

Use TAKEOWN and ICACLS with very long paths and filenames
article #1361, updated 14 days ago

If there are very long folder or file names, or the path is just too long somewhere down in the tree, this will fail:

ICACLS X:\folder /Q /C /T /reset

but this will succeed:

ICACLS "\\?\X:\folder" /Q /C /T /reset

Apparently the latter incorporates a different API somewhere in the chain.

For TAKEOWN, we just have to run it in Powershell, not CMD.

Powershell code to do it all at once, while CD’d to the level just above, using command-line parameter to specify folder name, is here:

param(
[string]$location
)

$iexcmd = 'TAKEOWN /F ' + '"E:\Shared Data\' + $location + '" /R /D Y'
Write-Progress -Activity "Reset Permissions" -CurrentOperation $iexcmd -PercentComplete -1
Write-Host $iexcmd
iex $iexcmd | Out-Null

$iexcmd = 'ICACLS ' + '"\\?\E:\Shared Data\' + $location + '" /Q /C /T /reset'
Write-Progress -Activity "Reset Permissions" -CurrentOperation $iexcmd -PercentComplete -1
Write-Host $iexcmd
iex $iexcmd | Out-Null

Categories:      

==============

Compile and Optimize the Xanmod Linux Kernel for Debian and Derivatives
article #1365, updated 15 days ago

Compiling a kernel does give you lots of added speed and memory-efficiency, if you do it right. Here’s one way way to do it right. I’m using it most joyfully on MX Linux, on two very different machines, right now. The steps below are for Debian and derivatives only. Manjaro has an AUR package called linux-xanmod.

  1. First enable sources for the kernel in the package manager. Not sure how this is done in Ubuntu. In close Debians, check /etc/apt/sources.list.d/debian.list, make sure the deb-src lines are not commented out. That means if you see any lines like this:
#deb-src http://deb.debian.org/debian buster main contrib non-free

make them look like this:

deb-src http://deb.debian.org/debian buster main contrib non-free
  1. Next step is to have apt take in all standard packages for kernel building (the third line is specified as for 64-bit Wintel hardware):
sudo apt-get update
sudo apt-get install build-essential bison flex pkg-config qtcreator qt5-default qttools5-dev-tools libssl-dev
sudo apt-get build-dep linux-image-amd64
  1. Now we create a folder and clone the current Xanmod source into it:
cd
mkdir custom-kernel-xanmod
cd custom-kernel-xanmod
git clone https://github.com/xanmod/linux.git xanmod
  1. And now we get down to business. We enter the source tree, and compile a GUI configurator, xconfig.
cd xanmod
make clean
make xconfig
  1. After xconfig has been made, it will bring up a GUI. The GUI has a search capability (thank God for his often unaware servants), you’ll want to search (Control-F) for the following:
  1. HZ_1000 is a setting which is highest of five, expressed as “1000 HZ”. It is timer interrupts per second. For non-desktop systems, 500 is often recommended. For anything desktop or multimedia, use 1000.
  1. CONFIG_MNATIVE is a setting which is bottom-most of a long list of specific CPU models. Unlike the others, this setting tells the compiler to optimize its output for the specific CPU in the very machine which this procedure is being run on. Using this will invariably get you a very, very fast kernel for this machine. Don’t try to use this kernel on a different machine, unless you know for certain that the different machine has exactly the same CPU.
  1. I have found the two above to produce really great performance. The third one I use, CC_OPTIMIZE_FOR_SIZE, is a non-default setting whose opposite is CC_OPTIMIZE_FOR_PERFORMANCE, and they mean what they say. In Debian, Ubuntu, Manjaro, and Arch Linux, I optimize for size in 8 or less gigabytes of RAM, and for performance in more; in antiX and MX Linux, I optimize for size in less than 4 gigabytes of RAM, they have been handling an amazing number of Chrome tabs (a nice practical test) in just 4G RAM. That is an amazing disparity, but as of this writing (March of 2020) this is what I have been finding.
  1. File/Save, File/Exit, or Control-S then Control-X.
  1. Run ‘htop’, to see how many apparent CPU cores are available. Add 1 to this number. Let’s say the result is 3.
  1. Compile the kernel. Notice the 3, you’ll want to replace this with the calculated number. This sets up the compilation to use all of your CPU cores at maximum efficiency, and speeds up the process according to what you have.
make -j3 deb-pkg LOCALVERSION=-xanmod-1000-native
  1. Unless it failed for some reason, the .deb packages are one level above in directories. Go there and install:
cd .. 
sudo dpkg -i linux-image*.deb linux-headers*.deb
  1. You can then boot and use Tab before the kernel loads to choose the new kernel. Or, you may want to install and use grub-customizer to choose the new kernel as standard.

Categories:      

==============

Linux Speed, Responsiveness, and Latency Reduction with 'sysctl' Settings
article #892, updated 16 days ago

On Manjaro, Debian, Ubuntu, and several others, these items are known help a lot in any application, including desktop, web server, or terminal server. The end of this post has two large compilations of these settings, one for wired (“non-lossy”) networking, one for wireless (“lossy”).

Do not use these on antiX or MX Linux, their developers have done much better right off the ISO. If you want more, recompile the Xanmod kernel for performance.

On the vast majority of Linux distributions, one can just add these changes to /etc/sysctl.conf, and then run sysctl -p to apply them without reboot. However, recent additions to standards have enabled us to place custom settings in our own configuration files, so that we don’t take /etc/sysctl.conf out of distro control.

On recent Debian and Ubuntu, we may best put them in /etc/sysctl.d/99-custom.conf (or replace the word “custom” to your liking), and then run sysctl --system to load both /etc/sysctl.conf and everything under /etc/sysctl.d. The 99 causes it to be run last, i.e., to override any others. But look at what already is there; sometimes there is already a last 99.

On some other recent distros, it’s /etc/sysctl.d/custom.conf (the word “custom” is still arbitrary), and then run systemctl restart systemd-sysctl.

You can check your results with sysctl -A.

The first group is for wired networking performance:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control=illinois

A bit different first group for networking performance, is recommendable for anything involving wireless, i.e., “lossy” networks:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control = hybla
net.ipv4.tcp_allowed_congestion_control = hybla cubic

And then some general networking performance items:

net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1

And some for network security enhancement:

net.ipv4.tcp_synack_retries = 2
net.ipv4.ip_local_port_range = 2000 65535
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15

And now a few to keep virtual memory usage under good control:

vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2

And one to increase the maximum number of open and watched files, very helpful indeed for servers, file synchronization of all sorts, and many other functions:

fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

The above was compiled from these two excellent articles:

http://www.networkworld.com/article/2227856/opensource-subnet/best-networking-tweaks-for-linux.html
https://easyengine.io/tutorials/linux/sysctl-conf/

and other sources. Here is the whole set for wired (non-lossy) networking:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control=illinois
pre. net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1
vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

and another full set for wireless / lossy networking:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control = hybla
net.ipv4.tcp_allowed_congestion_control = hybla cubic
pre. net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1
vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

Categories:      

==============

Sticky notes for the Windows desktop
article #750, updated 18 days ago

I have just moved to this one:

https://www.notefly.org/

Bugs showing up in the others I’ve used, some of them only showing up at the end of the day when lots of notes exist.

Categories:      

==============

Reset StorageCraft ImageManager Password
article #1364, updated 19 days ago

Here is a quick link to the utility:

http://downloads.storagecraft.com/SP_Files/ImageManager.ResetPassword.zip

Categories:      

==============

Single Download via Powershell
article #1363, updated 20 days ago

To download a single file in binary mode, try translating this:

Invoke-WebRequest -Uri "http://fq.dn/sub/binary.exe" -Outfile "C:\folder\binary.exe"

Categories:      

==============

Linux Kernel Compilation Settings for Desktop Speed
article #1362, updated 24 days ago

Here is what I have been using, for speed. It’s probably important to note that I’m running in 8G RAM. The last one might be set to “performance” if I had 12G or more.

Processor Family, set to Native Optimizations

Processor type and features -> Timer frequency, set to 1000

General setup -> Compiler optimization level, set to “size”, for small memory usage

Categories:      

==============

Check Your Email Blacklists
article #644, updated 24 days ago

Here’s a great place to do so:

https://mxtoolbox.com/blacklists.aspx

And another:

https://www.ultratools.com/tools/spamDBLookup

And another:

http://www.dnsbl-check.info/

And a third, realtime:

http://www.uceprotect.net/en/rblcheck.php

Categories: