Skip to content

Instantly share code, notes, and snippets.

View shubhamkumar13's full-sized avatar
πŸ˜‘
is existing

shubham shubhamkumar13

πŸ˜‘
is existing
View GitHub Profile
@shubhamkumar13
shubhamkumar13 / hexdocs_offline.md
Created April 29, 2026 10:29
when my g++ or make fails to compile with rebar

Here's the Fish shell equivalent of the recommended fix from #1:

1. Add the directory to PATH (temporarily, for current session)

set -gx PATH /home/linuxbrew/.linuxbrew/bin $PATH

2. Set CC and CXX to just the compiler names (not absolute paths)

set -gx CC gcc-15
@shubhamkumar13
shubhamkumar13 / make-kerl-work.md
Created April 29, 2026 09:53
kerl issues with fedora ublue
SETUVAR --export CFLAGS:\x2dO0\x20\x2dI/home/linuxbrew/\x2elinuxbrew/opt/ncurses/include
SETUVAR --export LDFLAGS:\x2dL/home/linuxbrew/\x2elinuxbrew/opt/ncurses/lib

also make sure you have the latest java and autoconf

in addition use PLEASE USE bbrew

@shubhamkumar13
shubhamkumar13 / init.ts
Created October 16, 2025 18:24
motion-canvas-init
import { Circle, CODE, Code, CubicBezier, Layout, LezerHighlighter, makeScene2D, Path, Rect } from '@motion-canvas/2d';
import { all, createEffect, createRef, Reference, sequence, spawn, waitFor, createSignal } from '@motion-canvas/core';
import { parser } from "@lezer/python";
import { PathBuilder } from "owd-path-builder";
Code.defaultHighlighter = new LezerHighlighter(
parser.configure({
dialect: 'py',
})
)
@shubhamkumar13
shubhamkumar13 / revdep.md
Created May 29, 2025 12:44
Tutorial for simulating a revdep failure

a. Create 2 OPAM packages

  1. These stub packages which will be used to simulate what a revdep failure looks like.
    The respective directory structure.

     stub-b/
     β”œβ”€β”€ opam
     β”œβ”€β”€ dune-project
     └── src/
         β”œβ”€β”€ dune
@shubhamkumar13
shubhamkumar13 / ocaml_script_template.ml
Created January 6, 2025 12:35
ocaml scripting init template
(* shebang for ocaml *)
#!/usr/bin/env ocaml
(* to access files in the opam switch for the script *)
#use "topfind";;
#require "bos";;
let _ =
Bos.OS.Cmd.run_out @@ Bos.Cmd.v "ls"
@shubhamkumar13
shubhamkumar13 / range.rs
Created May 26, 2024 13:02
create a range with a custom function
fn range(start: isize, stop: isize, fun : impl Fn(&isize) -> isize) -> Vec<isize> {
let mut v = vec![start];
let mut temp = start;
loop {
temp = fun(&temp);
v.push(temp.clone());
if temp < stop {
break;
}
@shubhamkumar13
shubhamkumar13 / recurse-center-task.md
Last active April 30, 2024 04:54
recurse-center-task implementing a lisp interpreter in a weekend from scratch in rust, please don't disqualify I am working on it :prayge:
@shubhamkumar13
shubhamkumar13 / dune
Created April 28, 2024 06:03
dune for bin dir
(executable
(name main)
(public_name <keep-the-name-of-dir>.opam)
(libraries dream))
@shubhamkumar13
shubhamkumar13 / dune-project
Created April 28, 2024 06:01
starter dune project
(lang dune 3.0)
opam-version: "2.0"
depends: [
"ocaml" {>= "4.08.0"}
"dune" {>= "2.0.0"}
]