Skip to content

Instantly share code, notes, and snippets.

@ChrisRackauckas
ChrisRackauckas / README.md
Created July 26, 2025 14:48
Julia @ccallable C Header Generator - Automatically generate C header files from Julia functions marked with @ccallable

Julia @ccallable C Header Generator

This collection of Julia scripts automatically generates C header files from Julia functions marked with the @ccallable macro. This is useful when creating Julia libraries that need to be called from C/C++ code.

Files Description

1. ccallable_header_generator.jl

The main generator script that provides a simple and robust approach to generating C headers. It uses a manual definition approach where you explicitly define function signatures, avoiding complex AST parsing.

Features:

@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active September 25, 2025 08:22
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
@SMUsamaShah
SMUsamaShah / list_of_p2p_file_sharing.md
Last active December 6, 2025 20:50
List of P2P file sharing tools

Browser Based

  1. Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
  2. Localsend https://web.localsend.org/
  3. FilePizza https://file.pizza/
  4. ShareDrop sharedrop.io https://github.com/szimek/sharedrop (SOLD, not recommended, use one of the forks)
    1. A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop (SOLD, not recommended, use one of the forks)
      1. A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
  5. ToffeeShare https://toffeeshare.com/
  6. Instant.io https://instant.io/
@oxinabox
oxinabox / example.jl
Last active February 6, 2025 16:58
Running the Julia Compiler pipeline manually
#Helpers:
"Given some IR generates a MethodInstance suitable for passing to infer_ir!, if you don't already have one with the right argument types"
function get_toplevel_mi_from_ir(ir, _module::Module)
mi = ccall(:jl_new_method_instance_uninit, Ref{Core.MethodInstance}, ());
mi.specTypes = Tuple{ir.argtypes...}
mi.def = _module
return mi
end
"run type inference and constant propagation on the ir"
@jkrumbiegel
jkrumbiegel / makie_3d_barplot.jl
Created May 21, 2022 10:54
Makie 3D Barplot
@recipe(Barplot3D) do scene
Attributes(
color = theme(scene, :markercolor),
colormap = theme(scene, :colormap),
)
end
Makie.conversion_trait(::Type{<:Barplot3D}) = Makie.DiscreteSurface()
function Makie.plot!(p::Barplot3D)
@Moelf
Moelf / eduroam.8021x
Last active June 15, 2025 04:39
Harvard Secure and eduroam config for iwd and iwctl
[Security]
EAP-Method=TLS
EAP-Identity=<your harvard email>
EAP-TLS-CACert=/var/lib/iwd/usertrustrsacertificationauthority.cer
EAP-TLS-ClientCert=/var/lib/iwd/harvard_eduroam.p12
EAP-TLS-ClientKey=/var/lib/iwd/harvard_eduroam.p12
EAP-TLS-ClientKeyPassphrase=<your certificate password>
EAP-TLS-Phase2-Method=Tunneled-PAP
EAP-TLS-Phase2-Identity=<your harvard email>
EAP-TLS-Phase2-Password=<your harvard login password>
@Azzaare
Azzaare / startup.jl
Last active September 13, 2024 02:43
Azzaare's startup.jl
# Add this file to ~/.julia/config/ (mkdir config if necessary)
try
using Coverage
catch e
@warn "Error initializing Coverage: trying install" exception = (e, catch_backtrace())
using Pkg
Pkg.add("Coverage")
end
@aminnj
aminnj / convert.md
Created July 28, 2021 01:33
ROOT tree from julia to python

Since writing out ROOT files is currently not possible with UnROOT, one can write out Arrow files directly from an UnROOT.LazyTree object which can be read back in julia. With some consideration of the chunking, this won't use much memory.

using UnROOT
using Arrow
using Tables

treename = "Events"
filename = "18BCCE71-15B8-194B-8738-EC993C8DD3BD.root"
@ChrisRackauckas
ChrisRackauckas / diffeqflux_vs_jax_results.md
Last active April 9, 2024 00:57
DiffEqFlux.jl (Julia) vs Jax on an Epidemic Model

DiffEqFlux.jl (Julia) vs Jax on an Epidemic Model

The Jax developers optimized a differential equation benchmark in this issue which used DiffEqFlux.jl as a performance baseline. The Julia code from there was updated to include some standard performance tricks and is the benchmark code here. Thus both codes have been optimized by the library developers.

Results

Forward Pass

# Electromagnetic simulation at varying timescales - simulation code to make this animation:
# https://twitter.com/bencbartlett/status/1369396941730312193
#
# Animation idea was inspired by u/cenit997's (Twitter: @__cenit) Reddit post:
# https://www.reddit.com/r/Python/comments/hxmhai/a_simulation_of_how_an_incoherent_light_source/
#---
using LinearAlgebra, Base.Threads, BenchmarkTools, LoopVectorization, CSV, DataFrames, Printf, Plots