
How to use IR Emitters on Linux
I wanted to use Face unlock on Linux and receive all the same features as Windows Hello. Using howdy and this guide, you can!
Notes for my future self, shared with the world. Technical deep dives, tutorials, and thoughts on software engineering.
Subscribe to RSS
I wanted to use Face unlock on Linux and receive all the same features as Windows Hello. Using howdy and this guide, you can!

I wanted to setup face unlock on Linux with my new Dell XPS 13. This is how you can set it up for yourself!

I recently found myself locked out of my old school laptop. I did not have the windows password or the ability to login to any account on the machine.

"ReferenceError: globalThis is not defined" is an error produced by some newer JavaScript libraries as they access globalThis.

By default if you try to refresh custom new tab in a Google Chrome extension, you are met with a file not found error.

I had the idea in my mind that I wanted to create and have my own chrome extension for a few years now.

Lazy loading services allows services to only be started once they are needed.

You can make a div fit the size of its children by using `display: inline-block`

In order to make a script in Bash pause, sleep or wait for a period of time you need to use the command `sleep`

It can be tricky to get a new Flutter project to connect to Firebase and work. Version mismatches can be a real killer!

To use the latest es6 Promises in google app scripts it is very trivial to do so.

To list all the installed apt in linux you can use `apt list --installed`.

There are a few ways you can get the last element of an array in typescript

These are some rules I try and stick to while programming. I suggest you have a think about adopting these as I feel they are great values to code by.

It is a real time saver to keep your phone unlocked while developing an app. 'Stay awake mode' allows you to keep your phone unlocked.

There are a few steps and potential gotchas in setting up application debugging on your local device.

To request scopes in a Google Apps Script you need to add them to the appscript.json file.

If/ If Else is an integral function in any program or script. This is the syntax for such statement in LUA.

Sometimes xscreensaver will prompt the user to enter their password thinking they are trying to unlock the computer.

Show the git branch on the end of the terminal prompt is a really useful modification as you can always see the branch you are on!

To find the current git user you can use the following git command

Fish terminal is a great terminal. I was initially heisitant to try it but cnce I gave it a go I really liked it.

To get additional lines before and after the grep match you can add the arg **-n**

You can iterate over a map using the `forEach` method.

You would recognise the following as a pretty typical `SQL` insert query with an extra line unlocking a powerful feature.

Do you ever find yourself unconsciously opening webites out of habbit?

Having Windows hibernation on is a big killer due to the `Hiberfil.sys` file.

Every time you run `docker compile` on a Dockerfile a container is created, taking up space on your computer.

To enable the caching of images in Google Cloud Storage buckets you need to set the file or bucket to public and set the `Cache-Control` attribute.

To fix the routing you need to include the rewrites section in `firebase.json`

To get the IP Address in linux you can use `ifconfig` or `hostname -I`

To allow Bitbucket Pipelines access to your personal Google Source Repositories you need to do a few steps.

To Calculate the remaining scrollbar distance in Angular you need to perform some simple calculations on various window and document variables.

To query the firebase firestore in angular you can do the following

How to get the debug certificate SHA1

These are the lifecycles to remember in AngularJS.

Here is a quick example of ng-repeat usage and implementation

ngSwitch is the equivalent of a `switch` in java or other modern languages

Making an element expand the opposite direction is a useful html trick to remember

Creating an Observable in different ways is sometimes required based on the situation at hand. This is all you need to know!

Aliasing a command is very useful as it lets you shortcut a normal workflow and work more efficiently!

This is how you add an environment path to Fish terminal

Keybindings are really useful and save time.. this is how you utilize them in Fish terminal!

Making tab autocomplete in Fish terminal is a great customisation I strongly recommend as it allows you to press tab to complete the command.

Trying fish without the burden of changing your current terminal is useful incase you do not like Fish terminal

**WoeUSB** is the easiest and has the best compatibility for for all ISO's including Windows

An easy way to remember it is that **Providers** are at config time (before the application has finished loading).

To create a delay or sleep you use setTimeout. setTimeout is an essential function for every developer to memorise!

Sinon spys and stubs are very using in testing code. Spys and Stubs allow you to verify if a function was called and how it was called (args).

Here is a easy way to create a component or directive in AngularJS. This is an AngularJS Essential!

Changing the DNS in linux is pretty useful to get past any censorship your isp has imposed on you. *For example thepiratebay.org, 4chan.org*

Hotkeys in Google Chrome make your life way easier! All the power users of Google Chrome are using these hotkeys!

Setting the **src** attribute for elements is different if you need to reference a AngularJS variable.

You cannot filter an array using `Array.prototype.filter` using a promise as the function is synchronous and therefore does not support promises.

KDEConnect is a very useful application which allows you to control your computer and send commands from your smartphone!

You can copy files in linux using CP

Be default linux does not tell fonts to render with antialiasing and other nice features.

To add a number you need to encase the expression in `$((` `))`

Here is a cheatsheet for every option for a form value in Angular Schema Form

To use nested commands in bash you can surround the child command with backticks **\`** or **`${}`**

Lists in Java are pretty powerful and this is how you create them

You can find a files age using the git log command. As seen below

You can find a files latest changed time using the following

To check if the file is is a file in Java you need to do the following

There are many such use cases where you will find yourself required to compare two arrays in Java.

This is how you convert a list to an array in Java

I recently needed to convert a bytes object into a readable string format. I found that I could do so very easily using the following method.

The various ways you can create a list in Java

Symlinks are very useful as they allow you to make one file point to another file

To decode a string in Java you can import java.net.URLDecoder.decode

To ensure relative paths work in a bash script you can set the working directory to the directory the script is in.

To add a default value to a column in SQL you can do the following

To drop a default value from a column you need to alter the column and `DROP DEFAULT`

Sometimes you need to alter a table without dropping it. A big use case for this is a migration script adding or removing a column on a table.

To check that a column does not equal another column in SQL you can do the following

To convert an array to a object in typescript you can use the following helper function

You can copy files over ssh using the command scp.

Functions are the core of any good program or script. Functions in LUA are in the following format

SSH keys are useful as they allow you to securely identify yourself. You can create a SSH key by doing the following

You can create a view in SQL by following the following syntax.

Dropping or deleting a function in SQL is useful for many different scenarios. You might need to drop and re-create or you might not need the function anymore

To drop a trigger from a table you need this command

This is how you load a properties file in Java

You can merge a branch with a different history by adding the flag `--allow-unrelated-histories`

Using webpack you can proxy requests from one directory eg `http://localhost:8080/profile` to another address.

Putting phantomjs on the path will stop it downloading every time and therefore decrease the amount of time requiried to npm install.

To remove a file from a git repository you need to remove the cached version of it.

To allow docker to connect to a insecure host (a host using http instead of https) you need to edit the daemon.json to have some config!

You can scroll to the top of the page automatically by injecting Window and using the function scroll(x,y).

Google Drive is really useful *I use it for the central location of this blog infact!*

To install or remove/uninstall a python package you use pip.

Installation guide for AwesomeWM on xubuntu.

You can list the active processes in linux using `ps`

By default gcalcli loads 7 days on the agenda view. You can specify how many you want if you give it 2 number args, for example:

There is no such thing as *Advanced Operators* **`++`** or **`--`** in Lua

Reading from a properties file is a set some config outside of the script for ease of editing.

To refresh the build image, you need to add `--build` to the docker-compose command.

To remove the xscreensaver `New Login` button you need to set the entry for `XScreenSaver.newLoginCommand` to an empty value.

Services in Linux are generally things that run in the background providing a useful function or 'service'. Systemctl is the 'service manager'.

To set or update properties in a properties file from a bash script you can use **sed**

Currently it is not possible to declare a default value via the form object.

You might wonder 'how do I get the last lines of a log file' or 'how do I get new lines written to a file in linux'. Well tail is what you need!

Stream.of() can be used instead of creating an array then iterating over it.

This is a guide to using OAuth with Google APIs. This document shows how to get a Refresh Token which you can use inside your application.

Creating filters in Gmail is a great way to help manage and achieve a tidy inbox.

When creating util classes in java you should ensure you add a 0arg private constructor