Skip to content

Instantly share code, notes, and snippets.

@ikouchiha47
ikouchiha47 / Makefile
Last active July 23, 2024 07:56
LLM (llama3) powered test generator in neovim
gen.model.tester:
ollama create llama3-coder -f Modelfile
ollama run llama3-coder < /dev/null
cache.model.tester:
ollama run llama3-coder < /dev/null
@ikouchiha47
ikouchiha47 / cli.js
Last active July 10, 2024 09:41
Suck'em ratings
const { GoogleResults, BingResults, DDGResults } = require('./sniffratings');
function parseArguments(args) {
const argsMap = {};
let currentKey = null;
for (let i = 2; i < args.length; i++) {
const arg = args[i];
if (arg.startsWith('-')) {
@ikouchiha47
ikouchiha47 / debug.zig
Created July 7, 2024 19:55
zig, add println to std.debug
// file present in std/debug.zig
pub fn println(comptime fmt: []const u8, args: anytype) void {
lockStdErr();
defer unlockStdErr();
const stderr = io.getStdErr().writer();
nosuspend stderr.print(fmt ++ "\n", args) catch return;
}
Internet Engineering Task Force (IETF) Amitava Ghosh
Internet-Draft Example Inc.
Intended status: Standards Track June 3, 2024
Expires: December 3, 2024
A New Date Format for ISO Compatibility and Reduced Ambiguity
draft-iso-date-extended-date-format-00
Abstract
@ikouchiha47
ikouchiha47 / binary_search_categorized.md
Last active June 5, 2024 06:49
Algorithm Problem Statement Classification

Basic Binary Search

  1. Binary Search
  2. Search Insert Position
  3. Guess Number Higher or Lower
  4. Find Peak Element
  5. Find Smallest Letter Greater Than Target
  6. Search in a Sorted Array of Unknown Size
  7. Fixed Point
  8. Find the Index of the Large Integer
@ikouchiha47
ikouchiha47 / bozeman.sh
Last active February 21, 2024 08:39
Quickly search for ASMR music before starting to code
#!/bin/bash
#
# Search and play music from terminal. Like chop chop.
# There is enough fancy shit which we call RAM Diggers
#
# Usage:
# ./bozeman.sh <search term>
#
# Example ./bozeman.sh coffee shop noise
-- src/setup.lua
local version = _VERSION:match("%d+%.%d+")
package.path = 'lua_modules/share/lua/' .. version ..
'/?.lua;lua_modules/share/lua/' .. version ..
'/?/init.lua;' .. package.path
package.cpath = 'lua_modules/lib/lua/' .. version ..
'/?.so;' .. package.cpath
@ikouchiha47
ikouchiha47 / .vimrc
Last active February 16, 2024 08:22
"
" A (not so) minimal vimrc.
"
" You want Vim, not vi. When Vim finds a vimrc, 'nocompatible' is set anyway.
" We set it explicitely to make our position clear!
set nocompatible
filetype plugin indent on " Load plugins according to detected filetype.
syntax on " Enable syntax highlighting.
@ikouchiha47
ikouchiha47 / Resume.md
Last active February 11, 2024 18:30
New Resume
@ikouchiha47
ikouchiha47 / aws_deploy.tf
Last active December 10, 2023 22:20
AWS ECS Deploy
provider "aws" {
region = "ap-south-1"
}
// Create vpc and add a subnet
// Add a routing table and direct all traffic from internet
// to the subnet
resource "aws_vpc" "app_vpc" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true