Skip to content

Instantly share code, notes, and snippets.

View alexanderadam's full-sized avatar
⌨️
⌨️

Alexander ADAM alexanderadam

⌨️
⌨️
View GitHub Profile
@timothyham
timothyham / ipv6guide.md
Last active November 14, 2024 21:08
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

@q3k
q3k / hashes.txt
Last active November 11, 2024 17:38
liblzma backdoor strings extracted from 5.6.1 (from a built-in trie)
0810 b' from '
0678 b' ssh2'
00d8 b'%.48s:%.48s():%d (pid=%ld)\x00'
0708 b'%s'
0108 b'/usr/sbin/sshd\x00'
0870 b'Accepted password for '
01a0 b'Accepted publickey for '
0c40 b'BN_bin2bn\x00'
06d0 b'BN_bn2bin\x00'
0958 b'BN_dup\x00'
name: CI
on: push
jobs:
brakeman:
name: Brakeman
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
@kaspth
kaspth / stowaway.rb
Last active January 19, 2024 19:40
A Rails modeling implementation of https://brandur.org/soft-deletion
create_table :stowaway_records do |t|
t.string :record_type, null: false
t.jsonb :record_attributes, null: false, default: {}
t.timestamps
t.index :record_type
end
class Stowaway::Record < ActiveRecord::Base
def self.preserve(record)
create! record_type: record.class, record_attributes: record.attributes
@smileart
smileart / Day_1.md
Last active November 14, 2023 08:06
Euruko 2023
@JLarky
JLarky / Next.md
Created September 3, 2023 01:02
Initializing Next.js project with different package managers

Comparing install speed with cached deps

image

lower is better

Data

NPM

@schacon
schacon / git-related-files.rb
Last active June 24, 2024 07:31
git-related-files.sh
@stufro
stufro / return_mocked_object.cr
Created May 20, 2023 14:30
Crystal Spectator - using `inject_mock`
# spec.cr
require "spectator"
require "./spec_helper"
Spectator.describe OrderCalculator do
inject_mock Database
def_mock(Product)
it "multiplies the product price by given quantity" do
product = new_mock(Product)
@rain-1
rain-1 / llama-home.md
Last active November 9, 2024 03:49
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.