Skip to content

Instantly share code, notes, and snippets.

View laszlovandenhoek's full-sized avatar

László van den Hoek laszlovandenhoek

  • The Netherlands
View GitHub Profile
@gene1wood
gene1wood / differences-between-askubuntu-and-blog.botux.fr-how-to-setup-manual-full-disk-encryption-lvm-on-luks.md
Last active September 26, 2018 08:00
The differences between the askubuntu answer and the blog.botux.fr explanation of how to setup manual full disk encryption LVM on LUKS

There are a two different pages that address how to setup manual full disk encryption "LVM on LUKS". There are a few differences between the askubuntu answer and blog.botux.fr entry

Trivial difference

The mount point names are different (cryptcherries vs CryptDisk) but this has no functional impact

Optional step

The askubuntu answer explains how to zero out the newly created encrypted disk after the sudo cryptsetup luksOpen /dev/sda3 cryptcherries which the blog.botux.fr entry does not.

@efrecon
efrecon / run.tpl
Last active May 30, 2024 03:12
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@timothyklim
timothyklim / Crypto.scala
Last active March 21, 2021 19:18
AES encryption/decryption with akka stream
package utils
import akka.stream._
import akka.stream.scaladsl._
import akka.stream.stage._
import akka.util.{ByteString, ByteStringBuilder}
import scala.annotation.tailrec
import java.security.SecureRandom
import java.security.{Key, KeyFactory, PublicKey, PrivateKey}
import java.security.spec.{PKCS8EncodedKeySpec, X509EncodedKeySpec}
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 14, 2024 11:43
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'