Skip to content

Instantly share code, notes, and snippets.

View lucanastasio's full-sized avatar

Luca Anastasio lucanastasio

View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active January 13, 2023 07:55
Converting from String to Hex, from Hex to Bytes, from Bytes to String using Google Apps script

Converting from String to Hex, from Hex to Bytes, from Bytes to String using Google Apps script

This is a sample script for converting from the string value to the hex value, from the hex value to the byte array, from the byte array to the string value using Google Apps script.

When the creation of a signature for requesting and the encryption of data are used, there is the case that these conversions are required to be used. So I would like to introduce these scripts as sample scripts.

Sample script

@yvesh
yvesh / gist:64ec1f64e3c7c26497282b776348f662
Created December 19, 2019 11:49
Proxmox LXC Arch Linux Container with passed through GPU, KVM, sound, keyboard etc. (Xorg with amdgpu working), Looking Glass Host - Linux Main OS in a container
arch: amd64
cores: 24
features: fuse=1,mount=nfs;cifs,nesting=1
hostname: archxorg
memory: 64000
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=XX:XX:XX:XX:XX.XX,ip=dhcp,type=veth
ostype: archlinux
rootfs: local-zfs:subvol-100-disk-0,size=500G
swap: 512
lxc.autodev: 1
@ghfields
ghfields / TPM 1.2 - Auto Unlock - Cheat Sheet
Last active March 18, 2023 15:49
Read/Write password to TPM
# Check TPM version
# Install TPM 1.2 dependancies
apt install tpm-tools
# My tpm didn't have a one time configuration done in the factory and required me to run an additional command. I had output like:
# Tspi_TPM_TakeOwnership failed: 0x00000023 - layer=tpm, code=0023 (35), No EK
# https://sourceforge.net/p/trousers/mailman/message/19415379/ instructed me to run:
# tpm_createek
@develhox
develhox / switchs.h
Last active May 29, 2024 17:11
Switch operand implementation for the strings
#ifndef __SWITCHS_H__
#define __SWITCHS_H__
#include <string.h>
#include <regex.h>
#include <stdbool.h>
/** Begin a switch for the string x */
#define switchs(x) \
{ char *ss__sw = (x); bool ss__done = false; bool ss__cont = false; \