Skip to content

Instantly share code, notes, and snippets.

View naveenadi's full-sized avatar
🎯
Focusing

Aditya Agarwal naveenadi

🎯
Focusing
View GitHub Profile
-- vim: tabstop=2 shiftwidth=2 expandtab
-- We almost always start by importing the wezterm module
local wezterm = require 'wezterm'
-- Define a lua table to hold _our_ module's functions
local module = {}
-- Returns a bool based on whether the host operating system's
-- appearance is light or dark.
function module.is_dark()
@supersonictw
supersonictw / ollama-export.sh
Last active April 30, 2025 09:29
Ollama Model Export Script
#!/bin/bash
# Ollama Model Export Script
# Usage: bash ollama-export.sh vicuna:7b
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553
# Interrupt if any error occurred
set -e
# Declare
@yordanoweb
yordanoweb / fix-dirty-ntfs.md
Created January 17, 2024 16:11
Fix dirty NTFS disk from Linux

Fix dirty NTFS disk from Linux

The problem

Sometimes when try to mount an NTFS disk in Linux, you get at journalctl the error:

ene 17 10:52:55 hp3nvyl17 kernel: ntfs3: sda1: It is recommened to use chkdsk.
ene 17 10:52:55 hp3nvyl17 kernel: ntfs3: sda1: volume is dirty and "force" flag is not set!
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active May 13, 2025 16:43
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@kasuganosora
kasuganosora / llama_download.sh
Last active March 25, 2025 09:27
llama权重下载脚本
PRESIGNED_URL="https://agi.gpt4.org/llama/LLaMA/*"
TARGET_FOLDER="./" # where all files should end up
declare -A N_SHARD_DICT
N_SHARD_DICT["7B"]="0"
N_SHARD_DICT["13B"]="1"
N_SHARD_DICT["30B"]="3"
N_SHARD_DICT["65B"]="7"
# original post: https://rentry.org/sd-loopback-wave
# original author: https://rentry.org/AnimAnon
import os
import platform
import numpy as np
from tqdm import trange
import math
import subprocess as sp
import string
import random
@naveenadi
naveenadi / with_hooks.dart
Created April 12, 2022 16:15 — forked from rei-codes/with_hooks.dart
with useEffect
class HomePage extends HookWidget {
@override
Widget build(BuildContext context) {
useEffect(
() {
// initState
return () {
// dispose
};
},
@DavidAce
DavidAce / nvidia-tdp.service
Last active May 13, 2025 13:31
Nvidia power limit at boot
[Unit]
Description=Set NVIDIA power limit above default
[Service]
Type=oneshot
ExecStartPre=/usr/bin/nvidia-smi -pm 1
ExecStart=/usr/bin/nvidia-smi -pl 275
@h3ssan
h3ssan / JetBrains trial reset.md
Last active May 13, 2025 07:27
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@vegard
vegard / kernel-dev.md
Last active April 1, 2025 19:37
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.