Skip to content

Instantly share code, notes, and snippets.

# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}"
@ripx80
ripx80 / encryptedNixos.md
Created June 6, 2023 12:43 — forked from ladinu/encryptedNixos.md
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@ripx80
ripx80 / LLM.md
Created April 20, 2023 08:04 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@ripx80
ripx80 / ffmpeg.md
Created April 14, 2023 12:14 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet

I've been writing Rust full-time with a small team for over a year now. Throughout, I've lamented the lack of clear best practices around defining error types. One day, I'd love to write up my journey and enumerate the various strategies I've both seen and tried. Today is not that day.

Today, I want to reply to a blog post that almost perfectly summarised my current practice.

Go read it; I'll wait!


@ripx80
ripx80 / 55-bytes-of-css.md
Created September 28, 2022 13:22 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@ripx80
ripx80 / index.php
Created September 16, 2022 08:15 — forked from wiesson/index.php
Click 2 Call - XML RPC Example with PHP
<?php
if (!extension_loaded('xmlrpc')) {
echo "PHP xmlrpc extension is not available.";
die;
}
function call($remoteUri, $localUri, $username, $password)
{
$requestParameter = array(
'RemoteUri' => sprintf('sip:%s@sipgate.de', $remoteUri),
@ripx80
ripx80 / route_dump.c
Created March 10, 2022 09:18 — forked from cl4u2/route_dump.c
Linux route monitoring example
/*
iflist.c : retrieve network interface information thru netlink sockets
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute
v1.0 : initial version - Feb 19th 2010
This file was obtained at the following address :
http://www.iijlab.net/~jean/iflist.c
@ripx80
ripx80 / web-servers.md
Created December 28, 2018 09:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000