Archive for the ‘windows’ Category

extract images from browser cache

February 9, 2020 Leave a comment

I saw an image one day that disappeared the next day. It should be in my my browser’s cache (I use Firefox). How to see the content of the cache?

I found a freeware software for Windows that does the job, it’s called MZCacheView. I have a Windows 10 virtual machine where I installed this software. From Linux I copied my browser’s cache to Windows (via a shared folder), and then with MZCacheView I could visualize the images in the cache.

Unfortunately, I didn’t find the image in full-size, but I found its thumbnail. Well, more than nothing :)

Categories: firefox, windows Tags: , ,

C compiler for Windows

January 15, 2020 Leave a comment

You need a C compiler under Windows.

At you can find a MinGW distribution, which is x64-native and contains GCC and Boost. Download the installer, install it, and add its “bin” folder to your PATH.

Then you have a C compiler under Windows.

Force Avast NOT to scan my EXEs

December 29, 2019 Leave a comment

Currently I’m working on a C tutorial and thus I write lots of small C programs. I compile and try all of them to see that everything works fine. Unfortunately I need to do the tutorial under Windows. It wouldn’t be a big issue, but whenever I launch an EXE, Avast starts scanning my EXE because it’s suspicious :( I always lose several seconds with this shit. How to disable this “feature”?

In Avast you can exclude a directory. So I produce my EXEs in the folder C:\work and I told Avast not to scan this directory. Here is how to do it:

Open Avast, select Protection on the left, then select Virus Scans. On the right side you’ll see a small gear (cog) icon, click on it. On the tab “Full Virus Scan”, go down to the bottom and click on “View exceptions”. Click on the button “Add Exception” and specify the folder that you want to exclude (it was C:\work in my case). Done.

Categories: windows Tags: , , ,

[Nim] cross-compile under Linux to Windows

October 23, 2018 1 comment

You are under Linux, and you can produce an executable binary with the Nim compiler. However, you would like to produce a Windows EXE too. We want to stay under Linux and we want to produce the EXE on Linux. How to do that?

On Manjaro, I had to install this package:

$ yaourt -S mingw-w64-gcc-bin

It’s a cross-compiler that we’ll use for producing the EXE.

Let’s take a simple Nim source (hello.nim):

echo "hello windows"

Now cross-compile it:

$ nim --os:windows --cpu:amd64 --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc -d:release c hello.nim

And you get hello.exe .

$ file hello.exe
hello.exe: PE32+ executable (console) x86-64, for MS Windows

If you copy it on a Windows system, you can run it there without any problem. Or, you can also run it under Linux with wine :)

$ wine hello.exe
hello windows

I found this idea in the following blog post: Writing a 2D Platform Game in Nim with SDL2.

Update (20181028)
I found info about it in the official docs too:

maximize a window

October 13, 2018 Leave a comment

In Manjaro (XFCE) it’s “Alt+F10”. In Windows it’s “Super key + up arrow”.

In Manjaro, you can find and edit all window manager shortcut keys from Menu → Settings Manager → Window Manager → Keyboard tab.

Originally, I wanted to figure out how to maximize a VS Code window (reddit question here).

[Office2007] Configuration starts every time

Office 2007 worked well for me. Then, suddenly, it started to configure itself every time I wanted to open a document / presentation / etc. The process took minutes and it was very annoying.

I found the solution in this video. In short: locate the file “C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\Office Setup Controller\SETUP.EXE” and rename it to something else, for instance “SETUP_old.EXE“. The stupid configuration won’t appear again.

Categories: windows Tags: ,

connect your laptop to your TV

December 30, 2017 Leave a comment

You want to connect your laptop to your TV. For instance you have Netflix / HBO GO / etc. subscription and you want to watch movies on a bigger screen.

Story time
We have an old LG HD-ready television (32LG3000) whose resolution is 1366×768. I had an old (and small) laptop connected to the TV via a VGA cable that worked well with movies (avi, mp4, etc.). This laptop had Manjaro on it and its resolution was 1024×768. When it was connected to the TV, the screen was cloned and the TV also had the same resolution. The image quality was very good. However, this laptop was weak for videos running in the browser, so for instance I couldn’t watch Youtube videos in full screen.

A few days ago I decided to try HBO GO. It’s similar to Netflix. It’s not expensive (7.66 USD/month), the first month is free, and you can cancel it any time. It was clear that my old laptop won’t be enough for this.

I tried another laptop, a Toshiba C55 that has a VGA and an HDMI output too. Strangely, the VGA output was not recognized by my TV, so I couldn’t use it. And when I tried HDMI, the image quality was shit. The colors were terrible and the image was blurred. The text on the screen was ugly and the whole thing looked pixelated. I tried every resolution, but it was the same shit :( I even changed the HDMI cable to a gold-plated one. Nothing. With a software I could adjust the colors but I wasn’t satisfied with the colors at all.

I don’t know the exact reason of the problem. Maybe our TV is old, maybe a full-HD TV would be better, who knows… It was clear that there is something wrong with the HDMI connection.

So, let’s get back to VGA. I had yet another laptop, a Dell Vostro 2510 (also old). It worked well for me and it only had a VGA output. I installed Windows 7 on it, connected to the TV, but the TV only showed a black screen. And when I changed the resolution down to 1024×768, the screen appeared on the TV! Yes! And the quality was good! Later I figured out that the resolution 1280×720 was even better for this TV. This laptop is sufficient for videos running in a browser. It took me 3 days to find the best solution…

I also made some experiments. With VGA, I tried different resolutions, but they looked ugly. The result was similar to the HDMI. However, 1024×768 and 1280×720 were good. Then I tried HDMI again with these two resolutions and they were ugly again. I don’t get it but fine…

TL;DR: Via VGA I got better quality on the TV. On the laptop I put Windows 7. The resolution 1280×720 worked well. HDMI produced shit quality but I couldn’t figure out why. I’ll stay with VGA.