Todoist App for Linux
Todoist is a free todo list service that works on many different platforms. You can have it on Android, Apple Phones, Windows, inside software such as Thunderbird and Postbox, and just access it through their website. But there is no native app for Linux, but there is a work around if you use Google Chrome.
Todoist offers a chrome extension, but all it does is add a button to your browser to view your Todoist tasks. To get a program that is more stand-alone and similar to the Windows Todoist version, download the official Todoist for Chrome App below from the Google Webstore.
LUbuntu Keyboard Shortcuts (Openbox)
Inside of LUbuntu there is no graphical program that comes packaged to edit keyboard shortcuts of your computer. But luckily, all of the keyboard shortcuts are stored in an easy to modify XML file. At the time of writing this post (Openbox 3.5.2), there is one somewhat annoying behaviour, in which you can’t set single-key keyboard shortcuts and I doubt this feature will change in the future.
- Navigate to the folder ~/.config/openbox
- Backup the XML file just in case you mess something up.
- Edit the XML file and change the
<keybind>
key
attribute to the key that you want.
To perform this task using the terminal, launch the terminal with
Ctrl+Alt+T
or by using the menu.
C Get MP4 Duration
I was recently working on a program that needed to get the duration of MP4 files and I really didn’t want to call an external program like ffprobe and parse the output. The code as it’s currently standing is below, but maybe the information along side it may be more useful. Now, this code isn’t 100% accurate and I coded it only for speed, lower IO usage and the videos I had to parse all were encoded under the same conditions.
PHP - Check if Production or Sandbox
When developing a site, it’s usually best to work on it on a local sandbox (development) server. This will allow you to quickly test the site without having to upload the files. Also, when working on a sandbox server, you have full control of the software that is running. This lets you test the code on various platforms, servers, PHP versions, and all sorts of other stuff.
But there is a down side to working on a local server, it’s that when you are finished you usually have to modify the configuration file and maybe a few other files so that it will work on the production server. These are basic things like database settings, API tokens, and switching from uncompressed JS to the compress JS files. This can get very old often and you will stumble around trying to find a way to detect if you are on a sandbox server or not so this can all be handled in the website code. Below are a few methods I came across, the first one being my preferred method.
Solve JavaScript Scroll Event Delay
JavaScript is one of those languages that has a lot of quirks. One of them that I recently ran into is how the scroll event isn’t triggered until after the page scrolls. You probably will notice this being a problem on a few sites that have sticky sidebars and headers. A sticky element is an element, such as a sidebar, that scrolls with the page and is always visible. If you notice that the sticky element lags behind by a fraction of a second when you scroll giving it a jittering effect, that site is victim to this JavaScript “flaw.”