Skip to content

Instantly share code, notes, and snippets.

View abcdw's full-sized avatar
🏛️
building

Andrew Tropin abcdw

🏛️
building
View GitHub Profile

Plans for 2021

What we do today?

Plans for the future.

Recap

Done (roughtly)

  • Installed a system and all user configurations in few commands.

Stateless Operating System

Problems of undesired statefulness

https://i.stack.imgur.com/JG9yA.png

Problems

  • Reasoning hugely increase congnitive load.
  • Not aware of what happens.

gpg explained

Plan for today

  • Brief introduction
  • Managing keys
  • gpg key instead of ssh and gpg-agent instead of ssh-agent
  • hardware tokens

Disclaimer

  • I’m not a security expert.
@abcdw
abcdw / nix vs guix.org
Last active February 17, 2024 14:21
nix vs guix.org

Nix vs Guix

These are notes to the stream: https://youtu.be/S9V-pcTrdL8

Some notes

  • We are not aware of a lot of GNU software available to us.
  • Seems that Guix more hacker-friendly/explorable.

General comparsion

DescriptionNixGuixComment

Nix syntax basics

Intro

Comments

(ns app.server.core
(:require [clojure.string :as string]
[ironhide.core :as ih]))
(defn -main []
(println "hello"))
(defmethod ih/get-global-sight :ihs/read-only [key args & [ctx]]
[(fn [x] {:ih/ro-value x
:ih/value x})
(ns rk-server.data-sending.pdf
(:require [unifn.core :as u]
[clj-htmltopdf.core :as htmltopdf]
[cheshire.core :as json]
[rk-server.email.core :as email]
[rk-server.data-sending.db :as db]
[rk-server.utils :as ut]
[rk-server.data-request :as data-request]
[rk-server.data-sending.crud :as crud]
[rk-server.data-sending.html :as html]
starting phase `set-SOURCE-DATE-EPOCH'
phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds
starting phase `set-paths'
environment variable `PATH' set to `/gnu/store/v9smm673l094xv4szq89i76glx323y6g-rust-1.34.0-cargo/bin:/gnu/store/6vs81md6jl8rz6rk0b21apncg5q3nz8m-rust-1.34.0/bin:/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin:/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin:/gnu/store/j74aabxwayjl9yfyrm6ni482gykxq48b-bzip2-1.0.6/bin:/gnu/store/9425b5dwpfc04bb4p58hsjypxghliyr3-xz-5.2.4/bin:/gnu/store/ypiyk8ngn79cz655jrl0hng37xv54yjr-file-5.33/bin:/gnu/store/4bzzz0lzjc9b7bfsnqbq2j22d4fvf433-diffutils-3.6/bin:/gnu/store/a4rxl40jr7gmq8bp3dryq4yq67cwkwiw-patch-2.7.6/bin:/gnu/store/fd621k6fmdnr1yiw0lbvw5spqaa169j3-findutils-4.6.0/bin:/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin:/gnu/store/lmfddplnplxd03bcqv3w9pynbnr1fp8k-sed-4.5/bin:/gnu/store/02k245xy33cvcnr8vm3lagm9zmb1s2wa-grep-3.1/bin:/gnu/store/5s2nib1lrd2101bbrivcl17kjx1mspw6-coreutils-8.30/bin:/gnu/store/7j3941iannrngdvgb
(def prices
[:car :cow :cow])
(shuffle prices)
(defn init-game []
{:doors (into {} (map-indexed (fn [a b] [a b]) (shuffle prices)))
:doors-count (count prices)
;; :turn 0
})
@abcdw
abcdw / sql-pretty-print.clj
Created April 28, 2018 11:13
Example of sql pretty print. ql/httpkit/cheshire.
(def sql-example
(->
(ql/sql {:ql/with {:_user #:ql {:select :*
:from :user
:where [:ql/= :id [:ql/param 5]]}
:_group {:ql/select :g.*
:ql/from {:u :user}
:ql/joins {:g {:ql/rel :group
:ql/on [:ql/= :g.user_id :u.id]}}}}
:ql/select {:name :u.name :group :g.name}