Linux - using a compositor without any additional visual effects
How to use a compositor to improve window manager performance and redrawing, but without adding any visual effects or animations.
C++, Android and .NET developer
How to use a compositor to improve window manager performance and redrawing, but without adding any visual effects or animations.
This is how I install Arch Linux with a minimal graphical environment - Openbox as a window manager, tint2 as panel, and some tray icons (network, sound and removable disk devices).
This is how I remapped a mouse button to do the same action as the mouse wheel click (because that other button was way more convenient to press than the mouse wheel).
My app was receiving a large binary file which was not sorted nor indexed in any way. Here I show how I searched in the file as fast as possible.
By default, the i3 tiling window manager allows switching workspaces on each monitor separately. We can achieve switching the workspace at all monitors at once, so that we will have something like multi-monitor workspaces instead.
There are 2 clipboard-like mechanisms in Linux - primary selection (copy by selecting text and paste by middle mouse button) and clipboard selection (copy by CTRL+C, paste by CTRL+V). Since I prefer using only the latter, I wanted to completely disable the primary selection.
Only with a few lines of CSS or JavaScript, we can make reading of content on some webs easier. I will show an extension which can be easily loaded to the browser to slightly influence how a web looks like, which can actually improve usability a lot.
When serializing using the Newtonsoft.Json
library, we can specify a custom ContractResolver
to e.g. make the properties appear to have a different name. We can use this possibility to shorten the key names.
We usually believe JavaScript running in the browser does not have access to some external information, but there can be some tricks how to obtain it. In this article, I will show how we can sometimes get the text the user types into the browser’s Search on page (Ctrl + F) field.
How to back up Google Drive files (including Google Docs documents) to the local disk using google-drive-ocamlfuse and rdiff-backup.
I was creating a project where I used emscripten to build C/C++ code into asm.js or WebAssembly to run in browser (together with classic JavaScript code). After deploying to web server, although everything worked, I encountered some warnings about incorrect MIME type of the .wasm file.
This is a specific example of using custom layout in Android.
Jenkins, with FTP publisher plugin, provides the Publish artifacts to FTP
post-build action. Here, I will show another way how to accomplish uploading to FTP - using LFTP.
After taking a screenshot in instrumentation tests, we often need it to be transferred back to the host computer. Here I explain different approaches I found.
If it is difficult to gain the desired effect using some standard layout (LinearLayout
, GridLayout
etc.) or a combination of them, it is relatively easy to programmatically create a custom layout class.
Older Android versions used a separate button to open a menu (which was then replaced by the action bar and its overflow menu). When testing applications using an emulator with some old Android, we often want to somehow access the menu. The emulators used to provide a button for this, but such buttons were shown only in a specific skin: Skin with dynamic hardware controls.
In Android 7 (maybe older versions, too), at least on Nexus phones, there is a file manager with some basic functionality.
Committed to master branch by mistake? Do not solve it by branching off a feature branch and then reverting that commit on master. You will lose changes in that commit - they will not be merged back from the feature branch.
A good habit is to begin each bash script with:
To implement a custom input stream in Java, the only mandatory method to implement is read()
. However, a stream with only read()
implemented can perform very badly.
How to convert strings in C++ between Unicode encodings (UTF-8, UTF-16 and UTF-32)? Here are some code snippets showing easiest ways I found out yet.
Similarly to Microsoft Visual Studio compiler, gcc and Clang compilers support precompiled headers, too. Let’s look at creating and using of a precompiled header in clang compiler, particularly at chaining of precompiled headers (building a precompiled header using another precompiled header compiled earlier).
This post is mostly inspired by facts summarised at utf8everywhere.org.
In Git, rebasing can be used instead of merging to integrate changes from another branch.
When rethrowing an exception in C++, there can really be a difference between throw
and throw e;
.