|signed short int||2||-32768||32767|
|unsigned short int||2||0||65535|
|signed long int||8||-9223372036854775808||9223372036854775807|
|unsigned long int||8||0||18446744073709551615|
Have you ever thought that life would be made easier and more productive if you had a quick way of creating a file at your fingertips?
Windows has always been very picky about file extensions, and non-standard Microsoft file types can be a pain to create quickly, but there’s a neat trick to add these to the “New” menu.
First you need to open up the Windows Registry Editor application and expand HKEY_CLASSES_ROOT
Within this list, you will need to search for your desired file extension.
In my case, I want to add Python files to the Context Menu. I will need to find a folder in this list named .py as this is the file extension used for python files.
Similarly, if you wanted to quickly create a new html file, you would look for .html
You will need to add a new Key named : ShellNew.
Right click on your desired file extension and click New -> Key.
Name it : ShellNew
You should now see a new “Folder” called ShellNew:
The last step will be to add a new String Value to the ShellNew key, named NullFile.
Right Click on ShellNew : New -> String Value
Name this : NullFile.
Your Registry Editor should now look something like this:
You can now check your Context Menu to see if your changes worked!
Enjoy your productivity!
Since Demember 2018, I have been experiencing long reboots and shutdown times. Alot of people have pointed out that the Reaktek drivers might be to blame for this issue. Uninstalling the latest driver and using an older version does seem to “fix” the issue out (until Windows update decides to install the latest drivers again)
I decided to try my luck again and try and fix this problem, and I found the solution.
There wasn’t a newer Realtek driver available so i decided to update my Ryzen 5 Mobile Graphics drivers. The Graphics driver didn’t seem to fix the problem, so I moved on to the Ryzen Mobile chipset drivers.
After a quick reboot, it seemed to have fixed the issue!
My first configuration of an NGINX server left me high and dry for a while. Coming from an Apache back-ground (where everything is done for you), NGINX felt a little archaic at first.
There was not much help out there for this issue so I will fill in the gap.
The error (in this case) was due to my symbolic link not being created correctly in sites-enabled.
I will go into a little more detail.
nginx: [emerg] open() "/etc/nginx/sites-enabled/mysite.co.uk" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
This is the error (above) was being shown with any of the following commands :
- Testing the configuration: sudo nginx -t
- Starting or reloading the service:
sudo service nginx restart
sudo nginx -s reload
nginx: [emerg] open() "/etc/nginx/sites-enabled/mysite.co.uk" failed (2: No such file or directory) in/etc/nginx/nginx.conf:62
This message is a bit vague, but there is a subtle hint here. The last path is pointing to the file containing the problem and the appended number correlates to the specific line number in that file.
In my case, line 62 was:
I know the syntax of the line is correct because I compared it with the default file included in the installation.
Similar to Apache, the sites-enabled directory is meant to store symbolic links of configuration files that are stored in sites-available. Unlike Apache, however, the symbolic links need to be manually created by the admin, as apposed to an Apache command that automatically creates and removes the links when asked.
Navigating to /etc/nginx/sites-enabled, I checked the symbolic link using the following command
sudo ls -la lrwxrwxrwx 1 root root 32 Jul 19 20:16 mysite.co.uk -> sites-available/mysite.co.uk
I previously created this link whilst in the /etc/nginx folder using the following command:
sudo ln -s sites-available/mysite.co.uk sites-enabled/
Looking back at the ls output, the local filename is correct, however the file path that it is pointing to isn’t.
The correct path should be:
The solution was to simply create a new symbolic link to the configuration file, but using absolute paths instead of being lazy.
sudo ln -s /etc/nginx/sites-available/mysite.co.uk /etc/nginx/sites-enabled/
After this, NGINX complained no more and after a silent reload, instantly served my webpage on the World Wide Web. Nice.
Yes, this was complete user-error spurred from my lack of knowledge of symbolic links, however this is no longer a problem and I can get back to development.
Hopefully this will save someone else loads of time!
Although Virtualenv is available on both Linux and Windows, there are some differences that you may find useful to understand.
Is there a difference to creating virtualenvs?
No, creating virtualenvs in Windows and Linux is exactly the same.
Can I use the same venv folder on both systems?
No. You will need to create 2 separate virtual environments. I suggest creating folders named
Do I activate the venvs in the same way?
No, but you CAN activate, and the differences are subtle. After creating the virtualenv, follow these steps:
Navigate to Scripts within the venv root. Type activate to use your venv in the current prompt
$ source linvenv/bin/activate
In the terminal, type source followed by the path to /bin/activate within the viretualenv folder