Skip to content

Instantly share code, notes, and snippets.

View mmtftr's full-sized avatar
😋
Hello there!

Mehmet Efe Akça mmtftr

😋
Hello there!
View GitHub Profile

Connect via SSH to a Slurm compute job that runs as Enroot container

Being able to SSH directly into a compute job has the advantage of using all remote development tools such as using your IDE's debugger also for GPU jobs (VSCode, PyCharm, ...).

  • Slurm: Scheduling system that many HPC clusters use
  • Enroot: Container system like Docker for NVIDIA GPUs

General problem:

@merelinguist
merelinguist / useLoaderData.ts
Created February 1, 2022 10:38
Transforms any Date objects from your Remix loaders into strings for a more accurate representation of Remix's deserialisation
import { useLoaderData as useRemixLoaderData } from "remix";
type Nullable<Type> = Type | undefined | null;
type Deserialized<Data> = {
[Key in keyof Data]: Data[Key] extends Nullable<{ [key: string]: unknown }>
? Deserialized<Data[Key]>
: Data[Key] extends Date
? string
: Data[Key];
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active May 11, 2025 09:22
Japanese Subtitles
@nealfennimore
nealfennimore / wireguard.conf
Last active January 29, 2025 10:57
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@jealie
jealie / koohiistroke.user.js
Last active March 7, 2018 20:55 — forked from shussekaido/koohiistroke.js
Adds kanji stroke order to the Study and Review sections of kanji.koohii.com. Works with Tampermonkey or Greasemonkey for Chrome or Firefox.
// ==UserScript==
// @name Kanji.koohii Stroke Order
// @namespace koohiistroke
// @description Adds kanji stroke order to the study and review sections on kanji.koohii.com - forked and modified from https://gist.github.com/shussekaido/3541ab70e37983f0360d
// @include http://kanji.koohii.com/study/kanji/*
// @include https://kanji.koohii.com/study/kanji/*
// @include http://kanji.koohii.com/review*
// @include https://kanji.koohii.com/review*
// @include http://staging.koohii.com/study/kanji/*
// @include https://staging.koohii.com/study/kanji/*
@wsargent
wsargent / win10-dev.md
Last active August 7, 2024 18:20
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially: