Given I’ve got this JS application. All client side JS communicating using web sockets. One page may have multiple web sockets open as many as 10-15.
Firefox and Chrome handle this many open web sockets at once just fine. IE11 seemed to have a limitation of 6 open web sockets at once.
Once I open that 7th web socket, regardless of socket call to the third-party server, I got an error thrown by IE, which closes the socket and gives the general error “SecurityError” and expanding the __proto__ section it gives me . The error seems to be pretty generic.
At first it looks as if there may be a trusted zone type issue with IE, but even after adding the client site to trusted zone as well as the server providing the data, the error still persisted.
This site shows the max connections settings for IE. It’s a registry setting in Windows that controls the amount of web socket connections.
Interestingly enough, By default, windows doesn’t have that registry key, but there is still a limit. Therefore you have to add the Registry in order for this to work.
The MSDN Section mentions:
WebSocket Maximum Server Connections
Internet Explorer 10. When enabled, the FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER feature sets the maximum number of concurrent WebSocket connections allowed to a single host. The minimum number that can be specified is 2 and the maximum value allowed is 128.
The default value for this setting is 6 in Internet Explorer and applications hosting the WebBrowser Control. To modify this feature by using the registry, add the name of your executable file to the following setting.
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
contoso.exe = (DWORD) 0x00000006 (6)
This should fix the problem.
I had been facing an issue recently in my system that the network connection often got lost and the network icon would start showing the yellow icon indicating that no internet connection is available even though the system is connected to the network.
To solve this I had to run the command
I had to do this every time and many times would realize that the system had been offline for a while.
Started becoming a bummer to me when others needed to access to my system.
I implemented this script and fired it on startup. It performs a simple task
- Check if google.com is reachable
- If Not then run IPCONFIG command
- if the state is not changed even after this command. that means that your system is actually down. therefore stop retrying
Here is the script:
Lets say you want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example,
In a windows console(CMD), the following command helps you get what you need
For /f "tokens=2-4 delims=/ " %a in ('date /t') do (set mydate=%c-%a-%b)
For /f "tokens=1-2 delims=/:" %a in ('time /t') do (set mytime=%a-%b)
echo "Testing 123" >> "testFile_%mydate%_%mytime%.txt"
This would output the filename appended with the desired time format.
Today I faced a peculiar issue, where I was trying to create a file named
It was a short code file and needed to be named with this name only.
The issue in this name is that PRN is a reserved keyword in the CMD execution shell.
Thus the file cannot be renamed to PRN.<extn> where <extn> can be any extension.
Do not use the following reserved device names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, PRN, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended
Magnificent app which corrects your previous console command, inspired by a @liamosaur tweet.
Few more examples:
➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done
➜ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
git push --set-upstream origin master [enter/↑/↓/ctrl+c]
Counting objects: 9, done.
No command 'puthon' found, did you mean:
Command 'python' from package 'python-minimal' (main)
Command 'python' from package 'python3' (main)
zsh: command not found: puthon
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
➜ git brnch
git: 'brnch' is not a git command. See 'git --help'.
Did you mean this?
git branch [enter/↑/↓/ctrl+c]
➜ lein rpl
'rpl' is not a task. See 'lein help'.
Did you mean this?
lein repl [enter/↑/↓/ctrl+c]
nREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848