Skip to content

Instantly share code, notes, and snippets.

View davidrothera's full-sized avatar

David Rothera davidrothera

  • Dublin, Ireland
View GitHub Profile
@davidrothera
davidrothera / gpg_resign.sh
Created December 28, 2020 16:47 — forked from qdequele/gpg_resign.sh
Resign all my old commits with GPG key
#!/bin/sh
cd $1
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "your@email.com" ]
then
git commit-tree -S "$@";
fi

Keybase proof

I hereby claim:

  • I am davidrothera on github.
  • I am davidrothera (https://keybase.io/davidrothera) on keybase.
  • I have a public key ASBerO2qUZQa2VlDf2SrhWhrEqRDABD7bQxDeAEV1M_nmQo

To claim this, I am signing this object:

@davidrothera
davidrothera / styles.less
Created May 23, 2018 13:50
Using Operator in Atom
atom-text-editor,
atom-workspace {
font-family: "Operator Mono for Powerline";
font-weight: 500;
line-height: 1.9;
}
atom-panel.tool-panel {
font-size: 0.88em;
}
@davidrothera
davidrothera / a2dp.md
Created February 17, 2018 19:59
Fix A2DP with Gnome/GDM

Issue

For some reason because GDM creates a pulseaudio session it ends up stealing the A2DP sink profile from the userland process.

Fix

Stop GDM pulse starting bluetooth discovery

  • Edit /etc/pulse/default.pa
# Comment out
load-module module-bluetooth-discover
@davidrothera
davidrothera / arch.md
Last active February 13, 2018 15:19
Installing Arch linux step-by-step

Install base system

The following steps will get you the basics of Arch running. It will install a fully encrypted root partition using LUKS on LVM and then boot into a GUI environment.

Format drive

fdisk /dev/sda

Create a GPT partition table and create 1 512M EFI partition and fill the rest with Linux Filesystem

@davidrothera
davidrothera / fix-infinality.md
Created February 9, 2017 19:05 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@davidrothera
davidrothera / pocket.sh
Created November 20, 2015 15:43
Send Safari bookmarks to Pocket
#!/bin/bash
# Script to export Safari's reading list into a text file and email the individual links
# First take all of Safari's Reading List items and place them in a text file.
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt
# Now loop over each of those URls within that text file and add them to pocket.
while IFS= read -r line
do
/usr/sbin/sendmail -i -f david.rothera@gmail.com add@getpocket.com <<END
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
/- auto_nfs -nobrowse,nosuid
### Keybase proof
I hereby claim:
* I am davidrothera on github.
* I am davidrothera (https://keybase.io/davidrothera) on keybase.
* I have a public key whose fingerprint is 74A7 A9E8 0779 983E A926 6EF9 2464 8245 0A1A 74FF
To claim this, I am signing this object:
tell application "Microsoft Outlook"
activate
set msgSet to current messages
if msgSet = {} then
error "No messages selected. Select at least one message."
error -128
end if
set theMsg to item 1 of msgSet
set theAccount to account of theMsg
set archiveFolder to folder "Archive" of folder "Inbox" of theAccount