Skip to content

Instantly share code, notes, and snippets.

View alkavan's full-sized avatar
😀
sup?

Igal Alkon alkavan

😀
sup?
View GitHub Profile
@alkavan
alkavan / hello.py
Last active April 2, 2025 10:56
Rocky Linux 9 server instructions for enthusiastic people who wish to run or train the LLaMA 3.1 models using HuggingFace.
import transformers
import torch
model_id = "meta-llama/Meta-Llama-3.1-70B"
# Transformer input sequences
inputs = [
"Hello bot! How are you doing today?",
#"What is the date today, and how is the weather in New York?",
#"What is the answer to the ultimate question of life, the universe, and everything?"
@alkavan
alkavan / ctf.cfg
Last active January 2, 2025 04:50
Install IOQUAKE3 on Rocky Linux 9.0
set sv_hostname "BewareSpace Q3 Arena (CTF)"
set sv_maxclients 12
set g_motd "mess with the best, die like the rest."
set g_forcerespawn 10
set g_gametype 4
set bot_minplayers 8
set g_spskill 3
set timelimit 15
set m1 "capturelimit 8; map q3ctf1 ; set nextmap vstr m2"
@alkavan
alkavan / rocky-linux-8_web-application-server.md
Last active June 8, 2024 17:06
Rocky Linux 8 | Web Server

Rocky Linux 8 - Web Application Server Installation Guide

Notice

This cheatsheet assumes the user is knowledgeable about bare installations of virtual private servers on cloud providers and is looking for quick but comprehensive instructions.

Some trivial commands might be missed or skipped.
However, this document can also work as quick tutorial for newcomers to the RHEL eco-system.

Also, I would like to promote Rocky Linux as a solid alternative for enterprise systems. Machines with Rocky Linux are provided by DigitalOcean a great and super stable cloud provider I've been using for years. All the following servers/services can be installed and run stable on a 1CPU/2GB/50GB, 2CPU/2GB/50GB or 2CPU/4GB/50GB droplets (choose by your load).

@alkavan
alkavan / generate-release-debian-9-stretch.sh
Last active December 29, 2021 12:05
Generate Debian Release File (stretch)
#!/bin/sh
set -e
do_hash() {
HASH_NAME=$1
HASH_CMD=$2
echo "${HASH_NAME}:"
for f in $(find -type f); do
f=$(echo $f | cut -c3-) # remove ./ prefix
if [ "$f" = "Release" ]; then
@alkavan
alkavan / docker.md
Last active December 29, 2021 12:03
Running common containers with docker

Postgres (running on boot)

docker run -d --name postgres --restart always \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=mysecretpassword \
-e POSTGRES_DB=mydatabase \
-p 5432:5432 \
postgres:13-alpine
@alkavan
alkavan / hardhat-openzeppelin-project.md
Created December 12, 2020 10:37
Hardhat and OpenZeppelin project bootstrap for Ethereum contract development

Install Instructions

Install Hardhat

npm install --save-dev hardhat

Initiate a new Hardhat project (in empty directory)

npx hardhat
@alkavan
alkavan / CentOS-8.2_Web-Server-Bootstrap.md
Last active October 9, 2020 09:06
CentOS 8.2 - Web Server Bootstrap (DigitalOcean)

CentOS 8.2 - Web Server Bootstrap (DigitalOcean)

General (and init)

Update system

dnf update

Set your timezone

@alkavan
alkavan / laravel_artisan_quick_help.md
Last active June 3, 2023 12:18
Laravel and Artisan Quick Help

Laravel and Artisan Quick Help

Project Creation

composer create-project laravel/laravel hello
cd hello && npm install

Run Development Webserver

@alkavan
alkavan / fedora.md
Last active March 4, 2025 20:10
A cheat-sheet for fresh Fedora Linux installations

Fedora Linux Cheat-Sheet

Compilers and Development Tools

Rust

Using rustup installer (recommended for development)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
@alkavan
alkavan / eth2-prysm-node-installation
Created April 29, 2020 10:23
Install instructions for ETH2 validator node on CentOS 8 at DigitalOcean
# Create a symbolic link to the 'shasum' command
ln -s /usr/bin/sha1sum /usr/bin/shasum
# Generate private key (will require generating a password)
./prysm.sh validator accounts create --keystore-path=$HOME/validator
# Paste generated data to field on https://prylabs.net/participate
# Run in tmux instances
tmux
./prysm.sh beacon-chain