Skip to content

Instantly share code, notes, and snippets.

View tsoporan's full-sized avatar
🦉
the owls are not what they seem

Titus Soporan tsoporan

🦉
the owls are not what they seem
View GitHub Profile
@tsoporan
tsoporan / full-disk-encryption-arch-uefi.md
Created June 19, 2024 19:57 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@tsoporan
tsoporan / arch-linux.md
Last active April 12, 2020 14:47
Install Arch Linux w/ Btrfs subvolumes and dm-crypt

Dell XPS 9360 only

  • Enter BIOS with F2 and configure:
  • "System Configuration" > "SATA Operation": "AHCI"
  • "Secure Boot" > "Secure Boot Enable": "Disabled"

Install Guide

Enter boot menu with F12, and boot the Arch USB medium

Set desired keymap

@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created October 6, 2011 18:33 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
from nltk.probability import DictionaryProbDist, ELEProbDist, FreqDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
from collections import defaultdict
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created October 6, 2011 05:53 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
from nltk.probability import DictionaryProbDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
'I win at everything and I want to love people' : 'pos',
@tsoporan
tsoporan / manual_nltk_bayes_classify.py
Created October 6, 2011 04:05 — forked from lrvick/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
from nltk.probability import DictionaryProbDist
from nltk import NaiveBayesClassifier
from nltk import FreqDist, ConditionalFreqDist
from nltk import BigramAssocMeasures
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
'I win at everything and I want to love people' : 'pos',
@tsoporan
tsoporan / results.py
Created June 23, 2011 03:44 — forked from lrvick/results.py
Get async celery results from nested subtasks as they complete
from tasks import task1
def get_results(queries):
query_procs = task1.delay(queries).get()
tasks = []
for query_proc in query_procs:
tasks.extend(query_proc.subtasks)
while tasks:
current_task = tasks.pop(0)
import urllib2,re
def url_title(url,**kwargs):
request = urllib2.Request(url)
try:
data = urllib2.urlopen(request)
except urllib2.HTTPError:
data = None
except urllib2.URLError:
data = None