Skip to content

Instantly share code, notes, and snippets.

@zacstewart
zacstewart / install-arch.md
Created February 5, 2024 06:01 — forked from mjnaderi/install-arch.md
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@zacstewart
zacstewart / classifier.py
Last active March 27, 2023 15:59
Document Classification with scikit-learn
import os
import numpy
from pandas import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
from sklearn.cross_validation import KFold
from sklearn.metrics import confusion_matrix, f1_score
NEWLINE = '\n'
@zacstewart
zacstewart / anonymous_user.rb
Created October 2, 2012 17:35
Rails Soft Sign-Up
class AnonymousUser < User
attr_accessible *ACCESSIBLE_ATTRS, :type, :token, as: :registrant
def register(params)
params = params.merge(type: 'User', token: nil)
self.update_attributes(params, as: :registrant)
end
end
@zacstewart
zacstewart / README.md
Last active October 21, 2019 07:30
Pair with all your friends on GitHub :DDDDD

pair

Requires ngrok and gh-auth:

brew install ngrok

gem install github-auth

@zacstewart
zacstewart / keybase.md
Created August 8, 2016 14:25
Keybase Proof

Keybase proof

I hereby claim:

  • I am zacstewart on github.
  • I am zacstewart (https://keybase.io/zacstewart) on keybase.
  • I have a public key ASDyhMC1RbxHHDDE-PJJ695Beo2RavwsBOrBgitPYcRLowo

To claim this, I am signing this object:

Running `target/debug/8bit-adventure`
ext_dt 0.00001922
dt 0.05
ext_dt 0.001740106
dt 0.05
ext_dt 0.001933184
dt 0.05
ext_dt 0.002147926
dt 0.05
ext_dt 0.002410486
class BillsChart
MARGIN = {top: 10, bottom: 20, left: 40, right: 0}
constructor: (data, selector) ->
@width = $(selector).width() - MARGIN.left - MARGIN.right
@height = 400
@x = d3.time.scale().range([0, @width])
@y = d3.scale.linear().range([@height, 0])
@color = d3.scale.category10()
@zacstewart
zacstewart / Bitrated public key
Last active December 31, 2015 05:19
arbitration@zacstewart.com Bitrated Bitcoin transaction arbitration GPG public key
02ec3b6fa309651799028cccc8d83112dc4d6666fcdfa6e30b50a5e15716e9274c
@zacstewart
zacstewart / command_line_arguments.rb
Created September 19, 2013 17:03
Stubbing command line arguments in ruby
module CommandLineArguments
def argv
ARGV
end
end