Skip to content

Instantly share code, notes, and snippets.

@fardjad
fardjad / debian-sid-with-systemd-on-wsl2.md
Last active June 28, 2024 04:15
[Debian sid with systemd on WSL2] Instructions for running Debian sid with systemd on WSL2 #windows #wsl2 #debian #sid #linux
@blakeNaccarato
blakeNaccarato / $1 WSL2 Setup.md
Last active November 5, 2022 21:43
[20/08/25] A guide to setting up Windows Subsystem for Linux 2 (WSL2) in Windows 10 version 2004

WSL2 Setup [20/08/25]

First, execute these commands in Windows pwsh/cmd to ensure the proper features are turned on.

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Then, update the [WSL 2 Linux kernel].

@yudhastyawan
yudhastyawan / c_penjumlahan.f90
Created May 24, 2021 12:49
embed Fortran in Python using Cython
module penjumlahan_interface
use iso_c_binding, only: c_double
use penjumlahan_module, only: penjumlahan
implicit none
contains
subroutine c_penjumlahan(a, b, c) bind(c)
real(c_double), intent(in) :: a, b
real(c_double), intent(out) :: c
call penjumlahan(a, b, c)
@npicciani
npicciani / snakemake.md
Last active November 2, 2023 18:12
Snakemake cheat sheet

Snakemake cheat sheet (coupled with github)

You can find the documentation here.

Installing snakemake on Farnam

You can easily install snakemake on Farnam with mamba:

module load miniconda
@timm
timm / cli.lisp
Last active October 10, 2022 17:34
Process command line flags. So simple. Who needs docopt, click, fire, argparse, etc?
(defun argv () sb-ext:*posix-argv*)
(defmacro while (expr &body body)
`(do ((now ,expr ,expr)) ((not now)) ,@body))
(defun deepcopy (x)
(if (atom x) x (mapcar #'deepcopy x)))
(defun cli (flags &key
(help "help")
@amb
amb / fft.nim
Created May 12, 2022 12:43
Simple Nim FFT
# OTFFT library
# http://wwwa.pikara.ne.jp/okojisan/otfft-en/optimization1.html
# This is +20-50% improvement
const thetaLutSize = 2048
const thetaLut = static:
var arr: array[thetaLutSize, Complex[float]]
let step = 2.0*PI/float(thetaLutSize)
for k, v in mpairs(arr):
v = complex(cos(step * float(k)), -sin(step * float(k)))
@GiulioCentorame
GiulioCentorame / doom_wsl2.md
Last active April 30, 2025 14:30
Doom Emacs on WSL2