Skip to content

Instantly share code, notes, and snippets.

View razielgn's full-sized avatar
🇺🇦
Слава Україні!

Federico Ravasio razielgn

🇺🇦
Слава Україні!
View GitHub Profile
# To set this up, first get tailscale working in an isolated linux shell:
# 1. sudo systemctl stop tailscaled.service
# 2. tailscaled -port 9993 -state tailscale-luks-setup.state -tun userspace-networking -socket ./tailscaled.sock
# 3. tailscale -socket ./tailscaled.sock up -hostname HOSTNAME-luks
# 4. tailscale -socket ./tailscaled.sock down
# 5. ctrl-c out of tailscaled
# 6 sudo systemctl start tailscaled.service
#
# Then add the .state file to your machine secrets and pass its path as tailscaleStatePath.
@cgrand
cgrand / set-game.clj
Last active November 15, 2021 16:42
the SET game in clojure.spec
;; the SET game in clojure.spec
;; inspired by https://github.com/jgrodziski/set-game
(require '[clojure.spec :as s])
(s/def ::shape #{:oval :diamond :squiggle})
(s/def ::color #{:red :purple :green})
(s/def ::value #{1 2 3})
(s/def ::shading #{:solid :striped :outline})
(s/def ::card (s/keys :req [::shape ::color ::value ::shading]))
@johnramsden
johnramsden / zfsinstall-1-setup.sh
Last active February 6, 2022 15:24
Install scripts for installing Arch Linux on ZFS. Not runnable, just listed commands.
#!/bin/bash
# Check before running, may need intervention
# Pass in the following to the script, or hardcode it.
# Uncomment if hardcoding input.
BOOT_PARTITION="/dev/sdg1"
DISK_1="ata-SanDisk_SDSSDXPS480G_152271401093"
DISK_2="ata-SanDisk_SDSSDXPS480G_154501401266"
POOL="vault"
@soarez
soarez / ca.md
Last active May 23, 2024 22:39
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@ehazlett
ehazlett / gist:9241844
Last active February 13, 2018 15:47
OpenShift Origin AWS

OpenShift Origin in AWS

This describes deploying and running OpenShift Origin in Amazon Web Services.

This is based upon the code and installer on 2014-02-26 so YMMV.

We will be using a VPC for deployment in us-east-1 and Route53 for DNS. I will leave the VPC setup as an exercise for the reader.

Prerequisites

  • AWS Account
  • VPC
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
Rehearsal -----------------------------------------------
instan_eval 0.258967 0.019441 0.278408 ( 0.485533)
bind.call 0.078391 0.003822 0.082213 ( 0.124251)
-------------------------------------- total: 0.360621sec
user system total real
instan_eval 0.259275 0.004492 0.263767 ( 0.309966)
bind.call 0.042689 0.000107 0.042796 ( 0.043009)
@vjt
vjt / bench.rb
Created March 9, 2011 10:11
Benchmark made easy
# Benchmark made easy
#
# bench { stuff } # runs stuff 1000 times and returns the real time spent doing it
# bench(100) { stuff } # as above, but 100 times.
#
# - vjt@openssl.it - public domain
module Kernel
def bench(n = 1000, &block)
raise ArgumentError, 'What should I benchmark?' unless block