Skip to content

Instantly share code, notes, and snippets.

View ityogi's full-sized avatar

Preetam Patil ityogi

  • Bangalore, India
View GitHub Profile
@timothyham
timothyham / ipv6guide.md
Last active July 25, 2024 18:49
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@thesamesam
thesamesam / xz-backdoor.md
Last active July 25, 2024 09:00
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@rain-1
rain-1 / llama-home.md
Last active June 19, 2024 03:05
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.
@reasonableperson
reasonableperson / whisper-stream.sh
Last active April 18, 2024 01:44
generate running transcript for web streams
#!/bin/bash
# whisper-stream.sh
#
# Take a url supported by yt-dlp, dump 30-second segments to the current
# directory named by unix timestamp, and transcribe each segment using Whisper.
#
# example: TZ=Australia/Canberra ./whisper-stream.sh "https://..."
#
# The time displayed is the time when ffmpeg first opens the segment for
@Diaoul
Diaoul / monitors.sh
Last active July 6, 2024 22:54
Arrange workspace on multiple monitors (Hyprland)
#!/usr/bin/env bash
set -e
declare -i last_called=0
declare -i throttle_by=4
@throttle() {
local -i now=$(date +%s)
if (($now - $last_called > $throttle_by))
then
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 27, 2024 18:00
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
@stefanbschneider
stefanbschneider / networking_datasets.md
Last active July 26, 2024 02:15
List of datasets related to networking. Useful for data-driven evaluation or machine learning approaches. Feel free to comment with updates.
@Daniel-M
Daniel-M / init.vim
Created December 3, 2018 20:16
My neovim configurations `./config/nvim/init.vim`
" let g:python_host_prog = '/usr/bin/python2'
" let g:python3_host_prog = '/usr/bin/python3'
" *************************************
" PLUGIN SECTION for Vim-Plug
" *************************************
call plug#begin('~/.config/nvim/plugged')
" Make sure you use single quotes
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 27, 2024 18:55
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@mullnerz
mullnerz / archive-website.md
Last active July 28, 2024 03:19
Archiving a website with wget

The command I use to archive a single website

wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P . www.foo.com

Explanation of the parameters used

  • -m (Mirror) Turns on mirror-friendly settings like infinite recursion depth, timestamps, etc.