Skip to content

Instantly share code, notes, and snippets.

View egidijus's full-sized avatar
🏠
Working from home

Egidijus Ligeika egidijus

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
import argparse
import glob
import os
import struct
import sys
from sentencepiece import SentencePieceProcessor
HPARAMS = keys = ["vocab_size", "dim", "multiple_of", "n_heads", "n_layers"]
@lanefu
lanefu / simple-git-over-ssh.md
Created November 10, 2022 13:37
simple self-hosted git over plain ssh

Sometimes you just need an easy way to have a private git repo. Put it on your favorite VPS, SBC, linux box, etc

creates a folder and git repo via relative path of user directory

GIT_REMOTE_DIR=GIT/hosted/example
GIT_REMOTE_HOST=myhost.example.com
ssh ${GIT_REMOTE_HOST} "mkdir -p ${GIT_REMOTE_DIR} && git init --bare ${GIT_REMOTE_DIR}"

Hello, Diagrams!

GitHub recently added support for including Mermaid diagrams in Markdown files. The good news is that it works for AsciiDoc files as well. Here is an example:

sequenceDiagram
    participant Alice
    participant Bob
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active September 24, 2024 01:46 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@ASharpPen
ASharpPen / drop_that_defaults.txt
Created April 4, 2021 10:21
Valheim default drop tables in Drop That format
[Blob.0]
ItemName=TrophyBlob
Enabled=True
AmountMin=1
AmountMax=1
Chance=0.1
OnePerPlayer=False
LevelMultiplier=False
[Blob.1]
@Sonata26
Sonata26 / valheim-console-guide.md
Last active May 9, 2024 23:50
Valheim Console Commands Guide Backup
@oofnikj
oofnikj / answerfile
Last active September 18, 2024 22:51
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@573
573 / build.sh
Created February 11, 2020 08:41
How to get the full path of a shell script to itself as data
#!/bin/bash
set -o nounset # Exit if undefined variable is used.
set -o errexit # Exit after first command failure.
set -o pipefail # Exit if any part of the pipe fails.
# set -o xtrace
echo "--- ${BASH_SOURCE[0]:-NOTSET}"
echo "See https://stackoverflow.com/q/242538/3320256 and https://stackoverflow.com/q/4774054/3320256"
echo -e " "
echo "--- direct variant:"
@webketje
webketje / README.md
Last active May 12, 2024 14:24
Notepad++ extension: "Open Folder as workspace" context menu entry

Notepad++ extension: "Open Folder as workspace" context menu entry

Adds a context menu entry upon right-clicking folders to open the folder as a clean workspace in Notepad++, like many other modern editors allow.
Requires Notepad++ 7.8 or higher.

Screenshot

Install

Run install.cmd as administrator, or open regedit and manually import the .reg file.

@Venemo
Venemo / mesa-howto.md
Last active August 24, 2024 15:32
How to build and use mesa from source

Building and using mesa for development and testing

This explains how to build mesa from source, and how to use the custom built mesa to run some apps and games, without needing to replace the mesa libraries that your operating system runs on.

Let's assume that you are using an x86_64 system.

Building mesa

Overview