Skip to content

Instantly share code, notes, and snippets.

@JuanM04
JuanM04 / README.md
Last active May 6, 2024 07:09
Install NVIDIA Container Toolkit on Fedora

Install NVIDIA Container Toolkit on Fedora

Last Updated: 2021-06-27
Tested on Fedora 34 (5.12.12-300.fc34.x86_64)

Install NVIDIA Drivers

First, add the RPM Fusion repositories:

@181192
181192 / increase_root_fedora.md
Last active May 6, 2024 07:07
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@ghinda
ghinda / git-commit-csv-export.sh
Last active May 6, 2024 07:07
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
@jboner
jboner / latency.txt
Last active May 6, 2024 07:06
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 6, 2024 07:06
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
# include "tray.hpp"
# include <Siv3D.hpp> // Siv3D v0.6.14
void DoTrayEvents()
{
// 以下より拝借:
// https://github.com/Siv3D/OpenSiv3D/blob/db4b25a0b48ca8c2f7c0d8b4c071637873e818f7/Siv3D/src/Siv3D-Platform/WindowsDesktop/Siv3D/Siv3DMain.cpp#L66
for (int32 i = 0; i < 100; ++i)
{
MSG message = {};
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@andygock
andygock / Windows 10 Tips.md
Last active May 6, 2024 07:03
Windows 10, remove bloatware and fix privacy issues. My personal notes for fresh installing Windows 10.
@tanyuan
tanyuan / mouse-button-mapping.md
Created April 18, 2016 11:22
Mouse Button Mapping on Linux

Mouse Button Mapping on Linux

I use Logitech Mouse M705 so I get extra mouse buttons to bind to desired functions.

You need xev, xbindkeys and xdotool installed.

Step 1. Find out button number

Run to find out the current keyboard/mouse key number:

local yank_group = vim.api.nvim_create_augroup("highlight_yank", { clear = true })
-- Set cursor position before yanking
vim.api.nvim_create_autocmd("ModeChanged", {
group = yank_group,
pattern = "*",
callback = function()
vim.g.pre_yank_cursor_pos = vim.fn.getcurpos()
end,
})