Skip to content

Instantly share code, notes, and snippets.

View grimmo's full-sized avatar

Luigi grimmo

View GitHub Profile

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
@grimmo
grimmo / llama-home.md
Created May 15, 2023 06:51 — forked from rain-1/llama-home.md
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
#ipset -q create fireh hash:net
rm firehol_level3.netset
wget https://iplists.firehol.org/files/firehol_level3.netset
my_file=$(cat firehol_level3.netset |grep -v "#")
ipset -q flush fireh
for row_data in $my_file; do
ipset add fireh ${row_data};
done
iptables -I INPUT -m set --match-set fireh src -j DROP
@grimmo
grimmo / cellalievitazione.py
Last active April 9, 2020 10:03
Monitoring cella lievitazione
#!/usr/bin/env python3
# Get values from Inkbird IBS-TH1 and write them to JSON
from time import sleep
import json
from bluepy import btle
import boto3
import logging
@grimmo
grimmo / spezzaPDFA.sh
Last active September 17, 2019 09:13
Split PDF every nth page and convert output to PDF/A
#!/bin/bash
COUNTER=1
NUMBEROFPAGES=<LAST_PAGENUMBER_IN_INPUT_PDF>
while [ $COUNTER -lt $NUMBEROFPAGES ]; do
pdftk input.pdf cat $COUNTER-$((COUNTER+1)) output OUTPUT${COUNTER}.pdf
gs -dPDFA -dBATCH -dNOPAUSE -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=OUTPUT${COUNTER}_A.pdf OUTPUT${COUNTER}.pdf
let COUNTER=COUNTER+2
done
@grimmo
grimmo / pparuling.md
Created February 19, 2019 12:31 — forked from auerfeld/pparuling.md
LAURI LOVE statement on property ruling

District Judge Margot Coleman has ruled that computers seized by the NCA in 2013 should not be returned to British Finnish computer scientist Lauri Love.

Love, who brought the case under the 1897 Police Property Act, said:

"Although the court has not in this instance exercised its discretion in my favour, I am thankful to have had a hearing and the opportunity to submit the issues in question to the consideration of the law. Sometimes applications to resolve tedious and stressful states of affairs are

AI like medicines

The original article is published (in italian) at https://blog.quintarelli.it/2018/10/ai-le-medicine.html. The author (and subsiquent rights) of the article is Stefano Quintarelli.

Think about medicines.

We know that in some cases they may cause victims. In some cases and if used inappropriately. But they normally work.

@grimmo
grimmo / gist:587c24b59475689e630a5de25a7d6af6
Last active April 29, 2019 12:26
Convert directory tree of eml files into Maildir (GYB Gmail backup)
mkdir -p ~Maildir/{cur,new,tmp}
for ciccio in `find . -type f -name \*.eml` ; do /usr/bin/getmail_maildir ~Maildir/ < $ciccio ; done
@grimmo
grimmo / rilevaosver.bat
Last active December 13, 2019 08:30
Rileva versione Windows macchine in dominio
dsquery * -filter "(&(objectCategory=computer)(!userAccountControl:1.2.840.113556.1.4.803:=2))" -limit 0 -attr cn operatingSystemVersion > elenco.txt
REM for /F %I in ('type elenco.txt') do systeminfo /S %I | findstr "host OS "
@grimmo
grimmo / setta_data.sh
Created July 26, 2017 12:33
Set the timestamp via exiftool based on directory name structure
for foto in `find . -name "*.jpg" -not -path "*/.xvpics/*"` ; do DATAFOTO=`dirname $foto | cut -d '.' -f3,4 | cut -d '-' -f1 | sed -e 's/^/19/'| sed -e 's/[a-z]//g' | tr '.' ':' | sed -e 's/$/:01 00:00:00/'` ; if [ ${#DATAFOTO} -eq 19 ] ; then exiftool "-AllDates=$DATAFOTO" "$foto"; fi ; done