Skip to content

Instantly share code, notes, and snippets.

View shaqash's full-sized avatar
🐧

Shaked Ashkenazi shaqash

🐧
View GitHub Profile
@shaqash
shaqash / llama-cpp-docker-linux.md
Created October 13, 2025 11:47
llama-cpp-docker-linux

This guide runs llama.cpp on any linux system, it uses Vulkan as it fits with my AMD GPU, but you can use any other .Dockerfile in .devops directory (i.e. cuda.Dockerfile for NVIDIA).

Install docker (fedora as an example)

sudo dnf install podman podman-docker
sudo systemctl enable --now podman.socket
@shaqash
shaqash / steam.desktop
Last active November 26, 2020 12:17
Steam for low memory consumption
[Desktop Entry]
Name=Steam
Comment=Application for managing and playing games on Steam
Comment[pt_BR]=Aplicativo para jogar e gerenciar jogos no Steam
Comment[bg]=Приложение за ръководене и пускане на игри в Steam
Comment[cs]=Aplikace pro spravování a hraní her ve službě Steam
Comment[da]=Applikation til at håndtere og spille spil på Steam
Comment[nl]=Applicatie voor het beheer en het spelen van games op Steam
Comment[fi]=Steamin pelien hallintaan ja pelaamiseen tarkoitettu sovellus
Comment[fr]=Application de gestion et d'utilisation des jeux sur Steam
@shaqash
shaqash / compose.js
Last active December 16, 2020 14:19
Example of pipe/compose function
/**
* pipe = LTR compose function.
*
* **Example** (first, second, third) => (arg) => third(second(first(arg)))
* @param {...Function} funcs Functions to run in **left to right** order.
* @returns {(arg: string) => string} Composed function.
*/
const pipe = (...funcs) => (param) => funcs.reduce((acc, cur) => cur(acc) , param);
const compose = (...funcs) => (param) => funcs.reduceRight((acc, cur) => cur(acc) , param);
@shaqash
shaqash / getfonts.sh
Created August 17, 2020 19:52
Linux - get list of fonts ttf/otf
fc-list | grep -Eo '\/[a-zA-Z-]*.(ttf|otf)' | cut -c 2- | sort
async function setTimeoutPromise(callback: () => void, timeout: number) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, timeout);
}).finally(callback);
}
@shaqash
shaqash / reddit.py
Last active July 24, 2019 18:47
Open reddit/subreddits from terminal
#!/usr/bin/env python
import sys
import webbrowser
if len(sys.argv) > 1:
for i in range(1,len(sys.argv)):
webbrowser.open('http://www.reddit.com/r/' + str(sys.argv[i]))
else:
webbrowser.open('http://www.reddit.com')
@shaqash
shaqash / bootable-usb.sh
Created July 24, 2019 18:44
Simple CLI for creating bootable usbs
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo "Missing argument/s"
exit 1;
fi
echo "Moving iso: $1 to Drive: $2.."
echo "EXECUTING: sudo dd bs=4M if=$1 of=/dev/$2 conv=fdatasync"
read -p "Confirm? (y/n)?" choice