Skip to content

Instantly share code, notes, and snippets.

@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@dschep
dschep / raspbian-python3.6.rst
Last active October 24, 2023 14:57 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@PaulMaddox
PaulMaddox / decrypt.sh
Created April 4, 2014 10:38
LUKS encrypted image file
#!/bin/bash
FILENAME="private.img";
FILESIZE="100M";
# Create encrypted volume if it doesn't exist
if [ ! -f $FILENAME ]; then
echo "Creating image file...";
dd if=/dev/zero of=$FILENAME bs=$FILESIZE count=0 seek=1
@eendeego
eendeego / bindings-cheat-sheet.md
Created November 28, 2012 10:26
Node/V8 bindings cheat sheet
@bdd
bdd / pbkdf2.c
Last active August 18, 2021 19:43
Generate a key from a passpharse w/ PBKDF2
/*
* Copyright (c) 2011 Berk D. Demir <bdd@mindcast.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR