Skip to content

Instantly share code, notes, and snippets.

Looking for work

John Mifsud imabuddha

Looking for work
View GitHub Profile
View -

Chrome theme manifest.json color props

more info:

// Strings used by themes to identify colors in the JSON.
constexpr StringToIntTable kOverwritableColorTable[] = {
    {"frame", TP::COLOR_FRAME_ACTIVE},
    {"frame_inactive", TP::COLOR_FRAME_INACTIVE},
    {"frame_incognito", TP::COLOR_FRAME_ACTIVE_INCOGNITO},
View -

Git push results in “Authentication Failed”

If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

You may also need to update the origin for your repository if set to https:

git remote -v 
imabuddha / xsessionerrors
Last active January 23, 2021 08:54
Keep ~/.xsession-errors log file from growing too large. Place file in /etc/logrotate.d
View xsessionerrors
$HOME/.xsession-errors {
size 1M
rotate 3
imabuddha / -
Created January 18, 2021 08:05 use case examples from:
View -


-- disk I/O using iostat from sysstat utilities
local iotable = {}
local iostat ="iostat -dk", 2, -- in Kb, use -dm for Mb
    function(widget, stdout)
        for line in stdout:match("(sd.*)\n"):gmatch("(.-)\n") do
            local device, tps, read_s, wrtn_s, read, wrtn =
 -- [1] [2] [3] [4] [5]
imabuddha / theme.lua
Last active January 23, 2021 03:51
altered version of default awesome theme—place in ~/.config/awesome/themes/default/
View theme.lua
-- jdm awesome theme --
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local gears = require("gears")
local dpi = xresources.apply_dpi
imabuddha / rc.lua
Last active January 23, 2021 03:51
Awesome window manager config, place in ~/.config/awesome/
View rc.lua
-- jdm — customized awesome wnd mgr config
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- prevent hotkeys_popup from showing tmux keys
package.loaded["awful.hotkeys_popup.keys.tmux"] = {}
-- Standard awesome library
imabuddha / -
Last active January 16, 2021 09:21
by default the Awesome window mgr doesn't run the programs in `~/.config/autostart`
View -

Get Awesome to respect xdg/autostart

See also Arch Wiki for alternatives & other useful awesome tips.

Add the following to ~/.config/awesome/rc.lua:

local xresources_name = "awesome.started"
local xresources = awful.util.pread("xrdb -query")
if not xresources:match(xresources_name) then
imabuddha / lightdm.conf
Last active January 14, 2021 12:56
Login Greeter & Session Cleanup — file location: /etc/lightdm/
View lightdm.conf
# General configuration
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
imabuddha / starship.toml
Last active January 13, 2021 07:48
Starship prompt config, place in ~/.config
View starship.toml
# Don't print a new line at the start of the prompt
add_newline = false
# Wait milliseconds for starship to check files under the current dir (default: 30)
scan_timeout = 10
disabled = true
imabuddha / -
Created January 9, 2021 06:12
regarding system keychain not unlocking automatically
View -

Regarding system keychain not always unlocking automatically upon login/screen unlock

This might be due to pkg accountsservice not being installed. Messages like the following were appearing in /var/log/messages:

lightdm[3572]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files