Skip to content

Instantly share code, notes, and snippets.

View rmackinnon's full-sized avatar

Rob MacKinnon rmackinnon

View GitHub Profile

Creating a Fully Encrypted Filesystem

with GRUB, LUKS, and LVM under the Gentoo Linux Distribution

Intended Audience

This document is intended to help others achieve a fully encrypted platform, with lowered attack surface for at-rest data. The following text is designed and tailored for the Framework laptop, but should be applicable to most platforms. We will not be covering nested decryption nor the security implications of using TRIM/Discard, there are numerous documents that cover this thuroughly. You should be comfortable with filesystem and storage management.

Requirements

  • General understanding of the Linux commandline interface.
  • General understanding of LUKS and LVM partitioning.
@rmackinnon
rmackinnon / gist:8f0843967207f39c4ecb75ececad2d62
Created September 5, 2022 15:54
Gentoo Commandline One-liners
* Rebuild all packages depending on `${target_atom}`
Warning: Depending on the package being rebuilt...downloads and rebuild lists could
be extraordinarily large. YMMV
```emerge $(for pkg in `equery d =${target_atom} | awk '{print $1}'`; do qlist -qIe ${pkg} 2> /dev/null; done )```
- Description: This gets around some issues of packages being stuck with a version conflict, where a new version is pulled
in to build/install with existing packages still requiring the old version. Replace '$target_atom' with the package that is stuck.
- What's going on here/Why does this work? The sub-command runs a for loop where the input of the for loop pipes the output
@rmackinnon
rmackinnon / gist:cf71fb6d5a8ac70dec9471c00b260114
Created February 17, 2021 20:14
Simple Memory Usage Ex. #2
from memory_profiler import profile
@profile(precision=4)
def main():
_v = "valuestring"
_a = [_v] * 100000
del _a
main()
@rmackinnon
rmackinnon / gist:76f191201f5e41d9df90a5b6fe4ff61d
Created February 17, 2021 20:13
Simple Memory Usage Ex. #1
from memory_profiler import profile
@profile(precision=4)
def main():
_v = "valuestring"
_a = [_v for _t in range(0,10000)]
del _a
main()
@rmackinnon
rmackinnon / signal-desktop_v1.22.0_unit-tests.txt
Last active February 26, 2019 01:31
Unit Test Output from Signal Desktop v1.22.0 Development ENV
rmackinnon@ginka ~/Develop/signal-desktop $ yarn test
yarn run v1.9.4
$ yarn test-node && yarn test-electron
$ mocha --recursive test/app test/modules ts/test
Attachments
createWriterForNew
✓ should write file to disk and return path
createWriterForExisting
@rmackinnon
rmackinnon / revfind
Created July 21, 2017 19:32
Reverse Find: Recurse upward from CWD to root and list any files matching.
#!/bin/bash
# Reverse Find: Recurse upward from CWD to root and list any files matching.
if [ $# -eq 0 ]; then
echo "Usage: revfind [-d dir] <filename>"
exit 1
fi
if [ $1 == '-d' ]; then
@rmackinnon
rmackinnon / easierprivacy-noexceptions.txt
Last active April 4, 2017 20:19
EasyPrivacy Modicifcation EXCLUDING Exceptions
[Adblock Plus 1.1]
! Version: 201704041727
! Title: EasierPrivacy-NoExceptions
! Last modified: 04 Apr 2017 17:27 UTC
! Expires: 1 days (update frequency)
! Homepage: https://github.com/rmackinnon/
! Licence: https://easylist.to/pages/licence.html
!
! Please report any unblocked tracking or problems
! -----------------General tracking systems-----------------!
@rmackinnon
rmackinnon / easierlist-noexceptions.txt
Created April 4, 2017 20:12
EasyList Modification EXCLUDING Exceptions
This file has been truncated, but you can view the full file.
[Adblock Plus 2.0]
! Version: 201704041727
! Title: EasyierList-NoExceptions
! Last modified: 04 Apr 2017 17:27 UTC
! Expires: 4 days (update frequency)
! Homepage: https://github.com/rmackinnon/
! Licence: https://easylist.to/pages/licence.html
!
! -----------------------General advert blocking filters-----------------------!
! *** easierlist:easierlist/easierlist-noexceptions.txt ***
@rmackinnon
rmackinnon / keybase.md
Last active August 29, 2015 14:22
My Keybase proof for GH

Keybase proof

I hereby claim:

  • I am rmackinnon on github.
  • I am robmackinnon (https://keybase.io/robmackinnon) on keybase.
  • I have a public key whose fingerprint is A77C 9782 ECDF 2E43 6D24 82DB 6534 E1C3 5550 2A5E

To claim this, I am signing this object: