Wednesday, February 24, 2021

GMail app stuck on "getting your messages" , can't sync

Go to Apps/GMail/Storage and delete data. Not just cache, but data.

Thursday, August 20, 2020

How to avoid the dreaded "Last seen days ago" status on Skype

When you see the status  "Last seen days ago" for a Skype contact then you know there's trouble if you spoke to that contact recently. Your messages to that contact will be delayed by 20-30 minutes while he can send you messages instantly, making chats awkward.

This problem annoyed me too in recent months, but I stumbled on a solution: if you send your computer to sleep then always exit Skype first. If the computer goes to sleep while Skype is running then next time you awake it the "Last seen days ago" bug usually occurs.

So the solution is simply this: always log out of Skype before you sleep your computer.

Friday, May 15, 2020

Importing lots of data (SQL, etc.) into App Engine Datastore

Create a task queue with Cloud Tasks and a task handler in you app engine app which inserts the items in the database, then run a script on your local machine which reads the database and adds items into the task queue for insertion.

The queue can be configured, so your app engine app can handle the rate of tasks given to it.

Wednesday, May 13, 2020

Solution for ERROR: gcloud crashed (LookupError): unknown encoding: cp65001

I found that in the same command prompt where this worked before, suddenly I get this error.

If I close the command prompt and start a new one then it works again.

Thursday, April 30, 2020

Point subdomain only to appengine app

  • go to appengine app settings, custom domains
  • use main domain
  • in the box type the subdomain
  • if you want to point only the subdomain then ignore the A and AAAA records and add only the CNAME record :
subdomain  points to  server given by google

Tuesday, March 31, 2020

CPanel Domains vs. Add On Domains difference

They are just different views. Domains show all kind of domains (alias, sub, add on) in one place while the Add On domains panel only shows add ons.

Sunday, March 29, 2020

Adding Putty SSH key to Github

If you get an error then try this:


Here are some steps that are not at all clear when copy/pasting your public key. (For the record, I used Putty Key Generator for my keys.)
  • On the first line, enter ssh-rsa.
  • Make sure you add one space after ssh-rsa
  • When you copy/paste the key into the Key textbox it should preserve the \n characters (x0A). If you are using Notepad on Windows, you won't see these new lines until you copy the text to Github.
Notice on this screenshot, there's a space after ssh-rsa (See the cursor.) The public key text also includes three \n characters, so you can see the public key text bumps down to the next line three times in the textbox.SSH RSA Key
source: https://stackoverflow.com/a/17051410

Tuesday, December 17, 2019

That's why Vimium shows two or three character link hints when selecting links

In Vimium options only certain characters are allowed for link hints, which seriously limit the number of single character link hints. Allow more characters in the options.

Monday, December 9, 2019

XAMPP suddenly stops working, cannot connect

If there is no apparaent reason, no other program runs on the same port, there are no errors in the error log, XAMPP starts properly, etc. then try restarting your router if you have one. Sometimes my router gets confused or something and stops routing localhost traffic for some reason.

Sunday, December 8, 2019

VLC convert/save brightened/gamma corrected video

When doing the conversion, create a new conversion profile in the conversion dialog, enable video filters and there “image properties filter”, so the changed brightness value takes effect in the saved video.

Thursday, November 28, 2019

Thursday, November 7, 2019

Fix for google play updates stuck in download pending

Try closing the google play app and starting it again. Clearing its cache can help too.

Thursday, October 24, 2019

java convert exception stack trace to string

StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
sw.toString();

Wednesday, October 2, 2019

solution for android sharedpreferences is not updated when using stringset data

Just read the docs. The StringSet returned from prefs should not be modified. Make a copy.

Sunday, September 8, 2019

Fix PHP completion in Visual Studio Code

Disable the built in PHP completion extension and install PHP Intelephense.

Sunday, August 25, 2019

kill windows process by name

taskkill /im chosenproc.exe /f

Why it is easier to write a plugin for Emacs than VScode

As a long time emacs user I’m comfortable with Emacs, but I heard so much about VSCode that I gave it a try.

It’s certainly nice, many things work out of the box, the command palette is a nice touch (though a far cry from using Emacs with Helm) and the fact that most thing is accessible via the keyboard makes it a viable alternative.

So it’s like Emacs for the modern ages. Accessible, programmable. I can see myself using it for something in case it provides better support for some langugage than Emacs, though I still prefer Emacs, especially if LSP gives it equal footing in the future in terms of language support.

I tried to create a simple extension too and it was not too hard, but it required trial and errors and reading other extensions’s codes, because the documentation is pretty sparse.

The main takeaway about extensions for me is that VSCode provides an API which you have to use and it’s adequate if it provides the necessary access, but also limiting, because you can’t do things for which the vscode devs haven’t added support yet.

Also, the process of writing an extension is much more convoluted. You have to create an extension template with an npm command which fetches lots of packages into node_modules. Then you code the extension in vscode and trying it involves firing up an other vscode instance. There were mysterious errors when the extension did not work, but there were no error messages anywhere in the debug panel (turns out a node module I tried to use was not installed, but it was never reported to me, I only saw the error: the extension failed to start or something.)

Compared to this in emacs you simply evaluate some code in a buffer and it instantly becomes part of the editor. You are not limited by an API, because you can access the whole editor system. You can override core functions, etc. Of course, the greater power comes with greater responsibilities: you can break the editor if you reach too deep and not careful enough.

Conclusion: VScode is really nice, I like it, but I stil prefer emacs, because it makes it so easy to write extensions, you don’t even have to think about it. A small piece of code would be handy for a quick task? You just write it and it’s part of the editor. No registering an extension, no attaching to specific contribution points, no providers, etc. You just access what you need.

Thursday, August 22, 2019

elisp get time in seconds since the epoch

(string-to-number (format-time-string “%s” (current-time)))

Sunday, August 18, 2019

firefox increase menu font size, bigger font

  1. In a new tab, type or paste about:config in the address bar and press Enter. Click the button accepting the risk.
  2. In the filter box, type or paste devp and pause while the list is filtered
  3. Double-click layout.css.devPixelsPerPx and change its value to 1.5 and click OK. That corresponds to 150% of the classic font size.
Too big? Try 1.25
Too small? Try 2.0
Don’t choose a value below 1.0 or about 4.0 or you may find it difficult to get back to a viewable Firefox! If something does go terribly wrong, right-click the preference and then tap the R key to reset to the starting value.
https://support.mozilla.org/en-US/questions/1239467