Here JS API 3.1 changed the rendering quite a bit, you’re now getting a vector map that allows to set the heading and tilt of the camera.
But some of the functions also changed and ex. my way of doing the ‘recenter’ button if now not working.
Continue reading “HERE JS API 3.1 getting and setting map bounds”
If you use multiple emails in your repos (ex. work and private) you may have encountered a situation where your commit was rejected from the remote repository, due to bad email used. In order to fix that all you need to do is to set the correct e-mail for current repository:
git config user.email "firstname.lastname@example.org"
and then, reset the author of the last commit:
git commit --amend --reset-author --no-edit
This command can also be used with
git rebase -i on edited commits.
I moved completely to neovim. It’s my default editor, to the point that I don’t bother installing new plugins for vim. And that’s how I realised that git difftool is still using vim.
I recently installed a new colorscheme using Plugged, and launching git difftool would give me errors, because I didn’t install it for vim. The solution turned out to be simple. Git’s mergetool has the option to configure path for the desired tool. So I’ve set up mergetool to use vimdiff (diftool will use the same tool by default).
git config --global merge.tool vimdiff
git config --global mergetool.vimdiff.path nvim
When returning a Response from django REST API that contains a binary file, you may encounter an issue:
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte in position 11: invalid start byte
Continue reading “django REST framework downloading binary files”
Sometimes you need to accept a file from a user, and you don’t want to use django Forms. The details come down to how many files you need to accept and do you know the names of the files.
If the file is from your app (or frontend) and you expect it you’ll know the file name, because you named it. But if it is a user selected file the name will be unknown.
Continue reading “Handling files upload in django & python 3 without Forms”
You have a legacy database in your django application, but created models for it. At first, they were unmanaged, but then you realized that it’d be easier for everyone if django handled the whole database. Now you’re left with a bunch of fields having db_column set and are required to change the field name and also the column name in the database.
Continue reading “Renaming db_column through django migration.”
I’ve bought Star Wars Battlefront 2. That’s not all… I’ve pre-ordered it. Did I know about the loot boxes? Yes. Do I care? Yes. So why am I still playing and didn’t get a refund like apparently the whole Reddit did? Because I like the game. Continue reading “Star Wars Battlefront 2 and why I play it”
As of version 5.7 MySQL no longer support the keyword IGNORE for ALTER TABLE command, as it was an extension which was badly defined (more information here). Therefore it’s now impossible to use the old query that allowed to delete duplicates by creating a new UNIQUE INDEX and altering the table.
Continue reading “Add unique index to MySQL database”
You work on a repository where the .gitignore file is defined globally and already tracked by git, but you have some files in your local directory that you don’t want to be tracked (logs, or build files, *.pyc etc.) and would like to ignore them (because who doesn’t like git status to show “working tree clean” or the status bar in zsh to be green).
Continue reading “Ignore files in git without editing .gitignore”