Skip to content

Instantly share code, notes, and snippets.

@jdoss
jdoss / LUKS_and_TPM2_with_Fedora.md
Last active June 13, 2024 04:12
Decrypt LUKS volumes with a TPM on Fedora Linux

Decrypt LUKS volumes with a TPM on Fedora Linux

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER
@memento
memento / tokensign.py
Last active May 17, 2023 12:23
This script allows to you sign your loginToken the proper way to better authenticate to the Maiar DEX API.
"""
This script allows you to sign your loginToken the proper way
to better authenticate to the Maiar DEX API.
Prerequisite:
You need to install the pip package erdpy.
> pip3 install erdpy
"""
from erdpy.accounts import Account
from erdpy.wallet.signing import sign_message
@superseb
superseb / rke2-commands.md
Last active June 16, 2024 15:37
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@CasiaFan
CasiaFan / ubuntu1804_dGPU_install_nv_deepstream.dockerfile
Last active December 22, 2021 12:46
Dockerfile to prepare DeepStream in docker for Nvidia dGPUs (including Tesla T4, GeForce GTX 1080, RTX 2080 and so on)
From ubuntu:18.04 as base
# install github and vim
RUN apt-get install -y vim wget gnupg
ENV DEBIAN_FRONTEND "noninteractive" # to skip any interactive configurations during installation
RUN apt-get install -yq keyboard-configuration
# install gstreamer
RUN apt install -y \
@htr3n
htr3n / macos-ramdisk.md
Last active May 31, 2024 13:59
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@trisharia
trisharia / createTemporaryFileInVro.js
Last active September 15, 2022 23:47
Create a temporary text-based file on the vRO server, which can then be copied elsewhere like a guest vCenter VM
// VMware vRealize Orchestrator action sample
//
// Create a temporary text-based file, in a temporary directory, on the vRO server
// Sample usage would be to later copy the file to a guest vCenter VM
//
// For vRO 6.0+
//
// Action Inputs:
// vroTempFileName - string - Name of the file to create
// fileContents - string - Contents of the file
@lkraider
lkraider / gs-resample.sh
Created March 7, 2017 20:06
Ghostscript PDF quality downsample
#!/bin/sh
# It seems it's very hard to set resample output quality with Ghostscript.
# So instead rely on `prepress` preset parameter to select a good /QFactor
# and override the options we don't want from there.
gs \
-o resampled.pdf \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/prepress \
@littleskunk
littleskunk / Storj_Farmer_Contracts.js
Last active March 19, 2021 07:20
Storj_Farmer_Contracts.js
// How to run it
// Requires nodejs LTS, git, python2
// Open command line and move to the folder where this script is stored
// Edit the script and modify storage location (line 87)
// Check the startDate and EndDate and modify it if you need another timeframe (line 102 - 103)
// Stop the farmer
// Execute "npm install storj-lib"
// Execute "node Storj_Farmer_Contracts.js"
// Start the farmer
@zmwangx
zmwangx / # macOS release checksums
Last active February 8, 2020 02:33
macOS / OS X installer checksums. When I don't have a particular image, I filled as many fields as possible with data from https://github.com/notpeter/apple-installer-checksums and/or https://github.com/drduh/macOS-Security-and-Privacy-Guide/blob/master/InstallESD_Hashes.csv. A list of build numbers can be found in the Apple Support article http…
We couldn’t find that file to show.
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`