Monday, 25 April 2016

Fixing "Manage the tracking of your own pageviews" in blogger.

Apparently there are solutions that work for people without personal domains assigned to their blogger blog, but for me these didn't work.

Some people suggest it's an issue with browser, some with windows 10.

Essentially what finally soled it for me was quite simple.

I have a blog under domain 0waste.life.

When I clicked the "Manage the tracking of your own pageviews" link in my Stats→Overview for the blog in question I got an error under this URL:

https://www.0waste.life/b/statsCookieManage 

Content in Chrome:

This site can’t be reached

www.0waste.life unexpectedly closed the connection.

ERR_CONNECTION_CLOSED

in Firefox:

Secure Connection Failed

The connection to www.0waste.life was interrupted while the page was loading.

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the web site owners to inform them of this problem.

in Internet Explorer:

This page can’t be displayed
Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://www.0waste.life again. If this error persists, it is possible that this site uses an unsupported protocol. Please contact the site administrator.

You get the idea.
If I used the solution with javascript I ended up on 404 page.

What helped? Simply changing https to http:

http://www.0waste.life/b/statsCookieManage

Got me where I wanted:

Good luck fixing your pageviews in third-party domain flavoured blogs!

Wednesday, 18 November 2015

Issues following Windows 10 upgrade (from windows 7)

Upgrade itself went smoothly, but system was pretty much impossible to operate, as every several seconds my screen flickered.

I have found this issue described by various users as:

Top window losing focus

or

Taskbar refreshing every 5 seconds

or

explorer.exe crashing and restarting / explorer.exe crash loop

Essentially extremely annoying behaviour not only not allowing to write anything without having to click inside the window, but also closing some Windows 10 dialogues.

I went through a long investigation process and found out that for Dell Laptops migrating into Win10, you may end up with some legacy drivers left there (in my case without even front-end to uninstall them) which will still be called and will crash explorer.exe causing massive CPU usage spikes and in effect the issue described above.

The offending driver was: C:\WINDOWS\System32\IDTNC64.cpl which apparently is a sound driver.

I would suggest that prior to any changes you first check if  your system is safe and sound otherwise by running:

sfc /scannow

in console in Administrator mode (elevated mode), which you can do like this:

Hit CTRL+Shift+Esc to open Task Manager

Select File -> Create new task (from top menu)

and then:



And press OK.

Enter the
sfc /scannow
and wait....

If everything is fine, then close console window and proceed to Even Viewer:

Press Windows+R to open the Run dialog, enter eventvwr and hit OK

There under summary of Administrative events in Errors part look for the one with the highest number of errors.



You should find the reason of your problems there, by double clicking the line, choosing Administrative Events from the menu on the left and going through the list looking for Level: Error, Source: Application Error

For me it was:

Faulting application name: explorer.exe, version: 10.0.10586.0, time stamp: 0x5632d4c0
Faulting module name: IDTNC64.cpl, version: 1.0.6454.0, time stamp: 0x5110e190
Exception code: 0xc0000005
Fault offset: 0x0000000000001154
Faulting process id: 0x1170
Faulting application start time: 0x01d12064eb4ed614
Faulting application path: C:\WINDOWS\explorer.exe
Faulting module path: C:\WINDOWS\system32\IDTNC64.cpl
Report Id: f5071629-6146-48da-9c51-e31661b1596b
Faulting package full name:
Faulting package-relative application ID:

You SHOULD try and uninstall the driver normally first.

I couldn't so the only option for me is to (again in administrator mode) rename the file to IDTNC64.cpl.trash

And wait for an updated version of the driver from Dell.

New Old Dell

Since my old Dell served me so well for so many years, even though it was bought as an old box then I've decided to do exactly the same again, and look for a toy that'll have the best possible specs while not killing my pocket.

So for really moderate £220 I've acquired a refurbished Dell Latitude E6220.

So again I have a laptop that fits nicely in my bag with 12.5” HD LED display, sturdy built and with 2.8GHz i7 processor, and 8GB memory it will last me some time still :)

It shipped with windows 7 Pro, which upon receiving the option I have upgraded to 10 (meeting some resistance), and adding VirtualBox with CrunBang's successor: BunsenLabs Hydrogen.




Tuesday, 3 November 2015

on timeouts

I have a webpage (really a script in php) which is munching a lot of data and spits a nice report as a web-page.
Don't ask. It had to be done this way.

That data comes from a very slow source, so the script had to have all sorts of timeouts taken down:

set_time_limit($seconds); 

being the first one. Setting seconds to 0 turns off limits. Use with caution!

Make sure that  this actually will remove execution limit.
Usual setup for php is execution time of the scripts limited to 30 seconds.
If displaying

bool set_time_limit (0);
ini_get('max_execution_time');

What you get isn't 0, then you need to look into changing the php.ini file.
The easiest way to find the location of your php.ini file (if you have access to the console) is running in the command line:

> php --ini

if you don't have access to the shell, then you can always script it by displaying configuration information via:

phpinfo();

Now that you know where to look, locate max_execution_time in it and change to whatever you want it to be. It understands the numbers as seconds. I discourage setting 0 (which will turn it off).

If you can't change your php.ini you might want to create a .htaccess with the following line:

php_value max_execution_time 200

For my needs however I am using wget to actually save the contents of the website to my disk.

That's yet another timeout to take care of. Otherwise wget will timeout, and my script is going to run for minimum 4 hours.

To remove the timeout from wget you need to run it with this parameter timeout set to 0:

> wget --timeout=0


Wednesday, 27 May 2015

Helpful command-line tips for Linux users part 7: displaying files - cat

list of all commands
explanation of the convention:
[] : values in square brackets are optional

cat BASIC USAGE 
cat [OPTION] [FILE]...- concatenate FILE(s) and print on the standard outputs, with no FILE, or when FILE is -, read standard input.
interesting options:
  -A     use ^ and M- notation, except for LFD and TAB, display TAB characters as ^I
  -b     number nonblank output lines
  -E     display $ at end of each line
  -n     number all output lines
  -s     never more than one single blank line

Standard output in most cases is the monitor, and standard input is keyboard, so when using cat without any parameters, what will happen is that you will be displaying on your screen immediately (after pressing ENTER) whatever you type.
This is sometimes useful for scripting purposes.

cat is not a very nice command when it comes to memory usage, so when you cat a large file carelessly, press Ctrl+S to stop displaying immediately. Then press Ctrl+C to stop the cat process.

Normal use of cat will be most often something like this:
> cat /etc/hosts
which will display the contents of the hosts file (if you have sufficient rights to see that file of course).

But mostly you will use cat with other commands such as this:
Split Files into 1024 Megabyte chunks, and then merge parts back into single file (with cat)
> split -b 1024m filename
> cat xa* > filename

Wednesday, 4 March 2015

Helpful command-line tips for Linux users part 6: working with directories - rmdir

list of all commands
explanation of the convention:
[] : values in square brackets are optional

rmdir BASIC USAGE 
rmdir [OPTION] DIRECTORY- remove empty directory/directories

for example this will remove a directory fps from /home/ishtar/games if it is empty
> cd /home/ishtar/games
> rmdir fps
this will do exactly the same, but when you're in a different dir, but it has to be empty, otherwise you will see this.
> cd /
> rmdir /home/ishtar/games
rmdir: failed to remove ‘/home/ishtar/games/’: Directory not empty
Removing many empty directories in one go (two ways):
> cd /home/ishtar/games
~/games > ls
mmos puzzle rpg strategy
~/games > rmdir mmos puzzle
rmdir: failed to remove ‘mmos’: Directory not empty
~/games > ls
mmos  rpg  strategy
As you can see the empty directory has been deleted, but the one which had some content wasn't.
> cd /home/ishtar/games
~/games > rmdir mmos/screenshots/2015/wow/ mmos/screenshots/2015/ mmos/screenshots/ mmos/
~/games > ls 
rpg  strategy
This will only work if all those directories are empty so to remove them nested that way you will either have to go with the last method above, or to save time use option -p:
~/games > rmdir -p mmos/screenshots/2015/wow
~/games > ls
rpg strategy
This is a safe option, because it deletes only directories which are empty.

Tuesday, 3 March 2015

Helpful command-line tips for Linux users part 5: working with directories - mkdir

list of all commands
explanation of the convention:
[] : values in square brackets are optional

mkdir BASIC USAGE 
mkdir [OPTION] DIRECTORY- make a new DIRECTORY

for example this will create a directory games in /home/ishtar/
> cd /home/ishtar
> mkdir games
this will do exactly the same, but when you're in a different dir.
> cd /
> mkdir /home/ishtar/games
Creating many directories in one go:
> cd /home/ishtar/games
~/games > ls
~/games >
~/games > mkdir mmos puzzle rpg strategy fps
~/games > ls 
fps  mmos  puzzle  rpg  strategy
As you can see this creates only one level of directories, but if you want to create a whole tree then that's possible as well with -p option:
~/games > mkdir -p mmos/screenshots/2015/wow
~/games > ls -R mmos/
mmos/:
screenshots

mmos/screenshots:
2015

mmos/screenshots/2015:
wow

mmos/screenshots/2015/wow:
as you can see if a directory exists (mmos) it will not get created, and no error will show up, the other directories are created.
Real Time Web Analytics