Saturday, 2 November 2019

Linux - Can I Duplicate, send, then and Deduplicate UDP packets?


I am transmitting UDP data across 2 Linux (Intel) based routers, and I am experiencing low levels of packet loss which are interfering with the application.


Is there a way (ideally, but not necessarily involving iptables) I can receive each UDP packet and send 2 copies of it, discarding the second one to arrive (if both packets arrive) ? I am aware that this will use double the bandwidth and I'm OK with that.



Answer



I know this is an older thread, but you might want to look into FEC.


Check our the "UDPspeeder" application written by wangyu. You can find it here on git: https://github.com/wangyu-/UDPspeeder


This application doesn't just duplicate the packet, but sends packets with information about being able to reconstruct the packet that is lost if needed.


There are lots of parameters to tune for your needs.


How to access linux/Ubuntu files from Windows 10 WSL?


This question answers how to access Windows files from Ubuntu Bash, but how can I do the opposite?


Specifically, I need to access my SSH key from Windows which is located at /home/mark/.ssh/id_rsa under Bash.



Answer



PM for Windows Command-Line here:



Updated October 2019: Updating the response below to reflect the newly added ability to directly access distros' Linux files via the newly integrated P9 server in Win10 1903 (and later).


IMPORTANT: Spelunking through the Windows filesystem to access Linux files has and will continue to be unsupported and STRONGLY recommended against! To understand why, please read this post



So how does one access Linux files using Windows tools (e.g. notepad, VS/VScode, etc.)? Previously, you couldn't, but starting in Windows 10 1903 we (finally!) expose your distros' filesystems to Windows via a P9 fileserver. We've also published an in-depth video discussing how this works! You can also read a summary of this new feature in this blog post


enter image description here


Look forward to hearing how you get on with this feature. If you find any problems, please file issues on the WSL GitHub repo here: https://github.com/Microsoft/wsl.


Friday, 1 November 2019

networking - Can not access computer on Windows network (0x80070035 The network path was not found)


Computer "A" and "B": Win 7 Ultimate x64, Kaspersky Internet Security 2015, Windows Firewall turned off, UAC turned off, users are Admins.
Asus RT-N12D1 WiFi router: Firewall and DoS protection turned off.
"A" & "B" ping each other and itself. Networks are Home type.
Network Discovery, File Sharing — on.
"A" is connected to the router via cable.
"B" — via WiFi.
"A" & "B" are visible in the networks of each other.
"Limit local account use of blank passwords to console logon only" — disabled.
I can access "A" from "B".
————————————
Edit:
I uninstalled 6to4 Adapter from "A" (there was none on "B"). This didn't helped.


The problem: I can not access "B" from "A". (0x80070035 The network path was not found)



Answer



I had TCP/IP NetBIOS Helper disabled on "A". So re-enabling it solved the problem.


worksheet function - Excel Elapsed Time as Plain Numbers Subtraction Formula


For sake of entry simplicity and to prevent Excel from inserting unnecessary time of day hours and AM/PM information, I am using this custom format to enter time in minutes and seconds: "00\:00"


I am trying to calculate time difference with this type of data, but Excel doesn't recognize it as base 60 numbering. Is there a way I can keep this format and still calculate a result?


e.g. If A1 reads "00:30" and B1 reads "01:21", how do I get C1 to calculate and result in "00:51"?



Answer



Here's a way to do it with a formula, although there are so many parentheses in this equation I'm about to go cross-eyed.


enter image description here


Since the rightmost two digits in your custom format represent the seconds, we can separate them using RIGHT(). Then subtracting that from the original number gives the "minutes" in your custom format.


I'll start out with the pieces, and then build the formula from its parts.


Convert B to Seconds  =  (60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2)
Convert A to Seconds = (60*(A2-RIGHT(A2,2))/100)+RIGHT(A2,2)
Difference in Seconds = ((60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2))-((60*(A2-RIGHT(A2,2))/100)+RIGHT(A2,2))

Now to convert back to the original format:
1. Divide the difference by 60, truncate it, and multiply by 100 to get the minutes part.
2. Divide the difference by 60, and take the modulus to get the seconds part.
3. Add 1 and 2.

Minutes Part = 100*(TRUNC((((60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2))-((60*(A2-RIGHT(A2,2))/100)
Seconds Part = MOD((((60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2))-((60*(A2-RIGHT(A2,2))/100)+RIGHT(A2,2))),60)

And here's the entire formula:

=100*(TRUNC((((60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2))-((60*(A2-RIGHT(A2,2))/100)+RIGHT(A2,2)))/60))+MOD((((60*(B2-RIGHT(B2,2))/100)+RIGHT(B2,2))-((60*(A2-RIGHT(A2,2))/100)+RIGHT(A2,2))),60)

Whew! Hope this helps.


Chrome Sync Error needs Passphrase


Update Sync Passphrase For the past week or so, there's a small orange error symbol in the top right corner when I open Chrome. It says to "Update sync passphrase". I don't remember ever having to enter a passphrase for this. It says I can reset it via the Google Dashboard but won't that delete passwords, autofill among other things?



Answer



If you've changed your Google Account password, then the sync passphrase will be your Google Account password prior to the one you changed to.


So if you changed your Google Account from hunter2 to hunter3, then the sync passphrase will be hunter2


linux - Avoid ffmpeg to lose the flv files keyframes


I use ffmpeg to convert my files, but when I do so, I lose the keyframes metadata from my flv files.


The command I use right now is:



$/usr/local/bin/ffmpeg -i %s -ab 96k -ar 44100 -b 500k -r 25 -f flv %s

How can I avoid ffmpeg to delete the keyframes info?


Regards


Zeeshan



Answer



Even though the metadata can be lost during any conversion step, it is always possible to regenerate them later.


There are a few tools that can be used to regenerate keyframe informations, including:



How can I change the default encoding type Thunderbird uses when composing a new email?


Whenever I compose a new email message in Thunderbird, it defaults to the Western (ISO-8859-1) encoding, and I have to manually change it to UTF-8 every time.


How do I change the default?



Answer



Tools → Options → Display → Formatting → Fonts → Advanced... → Character Encodings → Outgoing Mail:


Screenshot


How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...