Skip to content

Instantly share code, notes, and snippets.

@adrianlshaw
adrianlshaw / gnome-extensions.txt
Created January 4, 2022 19:40
A list of nice GNOME extensions
From Ubuntu repos:
* topicons
* gamemode
* bluetooth-quick-connect
* show-ip
Manually installed:
* Bluetooth battery indicator
@adrianlshaw
adrianlshaw / rpcs3.profile
Last active January 4, 2022 15:18
Firejail profile for RPCS3
# Firejail profile for RPCS3
# Description: PS3 emulator
# This file is overwritten after every install/update
# Persistent local customizations
include rpcs3.local
# Persistent global definitions
include globals.local # might be a problem
noblacklist ${HOME}/.config/rpcs3
noblacklist ${HOME}/.cache/rpcs3
@adrianlshaw
adrianlshaw / takeabreak
Last active January 30, 2022 14:02
Pop up reminder to get up every 20 mins and look outside for 20 seconds
#!/bin/bash
# Put this in /etc/cron.d/
# Install using `crontab -e` and add the following line
# */20 * * * * export DISPLAY=:0 && /etc/cron.d/takeabreak
if [[ $(date +"%H") -gt 18 ]]; then
echo End of work day. Not going to pop up.
exit 0
fi

Make Dockerfile

Put a Dockerfile in the root of your project

Building an image

docker build -t myproject . 

The dot at the end tells Docker to look for the Dockerfile in the current directory

I've recently returned to the world of software development for a research role, and as expected, I've been handed a big codebase to get to grips with.

To save time I often reach out to graphing tools to get an understanding of how the source code is really structured. There are plenty of complex tools but I just use Doxygen with Graphviz. Unfortunately, even that's not a terribly useable tool, so I'm writing down the steps I use here.

Go into your project and run:

@adrianlshaw
adrianlshaw / zephyr_and_tfm.md
Last active May 2, 2021 14:52
Building Zephyr with Trusted Firmware on Cortex-M CPUs
@adrianlshaw
adrianlshaw / unclack-linux
Last active January 29, 2021 16:36
unclack-linux
#!/usr/bin/env bash
# Program to mute the microphone while you are typing away on your loud keyboard.
# Inspired by the Unclack app for macOS
# This program is written by github.com/adrianlshaw and licensed under GPLv2
# To install as a background daemon, run "./unclack-linux install"
# Does not require sudo, but does assume you have systemd and pulseaudio
SERVICEFILE="
[Unit]
Description=unclack-linux
@adrianlshaw
adrianlshaw / 5min-go-crash-course.md
Last active February 6, 2021 21:06
Having fun with Go

Written for a friend.

Basic program:

sudo apt install golang-go

Make a file called main.go

package main

Keybase proof

I hereby claim:

  • I am adrianlshaw on github.
  • I am adrianlshaw (https://keybase.io/adrianlshaw) on keybase.
  • I have a public key whose fingerprint is 1ACE F182 610A A658 21E7 0BF5 15E8 21F5 771D FEB6

To claim this, I am signing this object:

Google Galaxy Nexus (GSM)

After spending hours trying to put PostmarketOS on my old phone I decided to write up some instructions to help someone save themselves some time.

Enter the bootloader by holding both volume buttons and the power button at the same time. You'll see a picture of an Android robot who is ready for surgery. Plug the phone into a PC with a USB cable.

Make sure your bootloader is unlocked by typing: