Skip to content

Instantly share code, notes, and snippets.

View astrobatty's full-sized avatar
:atom:

Attila Bódi astrobatty

:atom:
  • Princeton University
  • Princeton, NJ, USA
View GitHub Profile
@knowsuchagency
knowsuchagency / dokploy-sshfs-setup.md
Created November 1, 2025 21:23
Mount Remote Server via SSHFS on macOS - Complete Setup Guide

Mount Remote Server (dokploy) via SSHFS on macOS

This guide documents how to mount a remote server's directory as a network drive on macOS using SSHFS.

Prerequisites

  • macOS (tested on macOS Sequoia)
  • SSH access to remote server configured in ~/.ssh/config
  • Homebrew installed
@ngrislain
ngrislain / py38-success.ipynb
Last active September 10, 2025 03:46
py38 success.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mike-myers-tob
mike-myers-tob / Working GDB on macOS 11.md
Last active May 21, 2025 14:15
Steps to get GDB actually working in April 2021 on macOS (Intel x86-64 only)

Debug with GDB on macOS 11

The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork from the parent process and attach to the child in a second lldb instance. Otherwise, read on.

Install GDB

Don't make the mistake of thinking you can just brew install gdb. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069

$ xcode-select install  # install the XCode command-line tools
@kadereub
kadereub / numba_polyfit.py
Last active October 5, 2024 20:33
A numba implementation of numpy polfit
# Load relevant libraries
import numpy as np
import numba as nb
import matplotlib.pyplot as plt
# Goal is to implement a numba compatible polyfit (note does not include error handling)
# Define Functions Using Numba
# Idea here is to solve ax = b, using least squares, where a represents our coefficients e.g. x**2, x, constants
@nb.njit
@dvf
dvf / change-codec.md
Last active March 18, 2026 14:21
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.