Skip to content

Instantly share code, notes, and snippets.

View ingorichter's full-sized avatar

Ingo Richter ingorichter

View GitHub Profile
# Make sure you have Anaconda installed
# This tutorial assumes you have an Nvidia GPU, but you can find the non-GPU version on the Textgen WebUI github
# More information found here: https://github.com/oobabooga/text-generation-webui
conda create -n textgen python=3.10.9
conda activate textgen
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
python -m pip install -r requirements.txt
@habamax
habamax / emacs-python-treesitter-eglot.org
Last active April 22, 2024 11:39
Setup Emacs for Python with Treesitter and Eglot

Emacs, Python, Treesitter and Eglot

Treesitter (“better”/faster syntax highlighting)

  1. Make sure you have Emacs with treesitter support:

    M-: (treesit-available-p) RET should return t

  2. Make sure you have installed python treesitter grammar
@rena2019
rena2019 / deutschlandticket.md
Last active May 5, 2024 21:52
DeutschlandTicket Anomalien

DeutschlandTicket Anomalien

Einige DeutschlandTickets sind anders als die anderen. Preislich soll es für 49EUR starten und für ganz Deutschland einen bestimmten Featureset mitbringen. Folgende Verkehrsverbunde wollen allerdings Zusatzoptionen anbieten:

Falls Ihr noch weitere kennt: einfach unten als Kommentar oder via Twitter ergaenzen

  • Dresdner Verkehrsbetriebe AG (DVB) @ Verkehrsverbund Oberelbe (VVO) bzw siehe PDF vom VVO
    • Deutschlandticket Plus Mitnahme (+10 EUR)
      Berechtigt zur Mitnahme im Verkehrsverbund Oberelbe (VVO) von einem Hund oder einem Fahrrad ohne zeitliche Einschränkung sowie einem weiteren Erwachsenen und bis zu vier Schülern bis zum 15. Geburtstag von Montag bis Freitag zwischen 18 und 4 Uhr sowie ganztags an Wochenenden und Feiertagen.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>🔥 Make a photo booth app in about 15 lines of JavaScript</title>
<link rel="icon" href="https://fav.farm/🎥" />
</head>
<body>
@svoisen
svoisen / main.rs
Last active May 20, 2022 03:03
Print histogram of file line lengths using Rust
// Dependencies required in Cargo.toml
// clap = { version = "3.1.7", features = ["derive"] }
// deque = "0.3.2"
// ignore = "0.1.6"
// num_cpus = "1.13.1"
use clap::Parser;
use deque::{Stealer, Stolen};
use ignore::WalkBuilder;
use num_cpus;
@avielg
avielg / viewtree.py
Last active April 8, 2024 07:43
SwiftUI View Tree Graph
#!/opt/homebrew/bin/python3
import re
import glob
import os
import graphviz
##################################################################################
######### USAGE #########
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 4, 2024 23:11
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@tmo1
tmo1 / nextcloud-caddy-docker.md
Last active April 29, 2024 07:32
Nextcloud behind Caddy as a reverse proxy, using Docker

Introduction

This is a guide to deploying Nextcloud behind a Caddy reverse proxy, both running in Docker containers (an official Nextcloud one and a caddy-docker-proxy one), with the goal of implementing as much as possible via docker-compose files. This is much more difficult than it should be, for a variety of reasons:

  • As with Docker versions of software in general, documentation of the software does not always apply to the Docker versions, and the Docker documentation does not always include the Docker equivalent ways of doing things.

  • Docker images do not always expose the desired configuration knobs of the underlying software.

  • Nextcloud requires special configuration to run correctly behind a reverse proxy (and again, some of the instructions for this configuration requires modification for

@davebraze
davebraze / emacs-data-work.md
Last active March 26, 2024 21:49
On using Emacs for data work with R

I use GNU Emacs on MS Windows 11, specifically, the pre-packaged pre-compiled distributions for Windows provided by Vince Goulet (https://vigou3.gitlab.io/emacs-modified-windows/). He also provides a bundle for MacOS (https://vigou3.gitlab.io/emacs-modified-macos/). I have used, and occassionally still use, Emacs on a variety of different unixen. I believe most of what follows will apply to any GNU Emacs distribution or derivative on any platform, but of course, YMMV.

By way of background, I've been using Emacs since the late 80s as an IDE for various programming languages (e.g., pascal, C, lisp, matlab, python), and as a general text editor. I've also got a lot of mileage out of it's features for calendaring, scheduling, note-taking, and agenda making. So, when I started using R around 2001, it was natural to do my R scripting and programming in Emacs (using its ESS package, which I'd already been using with SAS since the early 90s). When RStudio came out in about 2011, I did give it a look, but it was

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}