Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@pudquick
pudquick / brew.md
Last active April 11, 2025 08:52
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@shawnli87
shawnli87 / download_gofile.sh
Last active February 12, 2025 11:55 — forked from MCOfficer/README.md
Bash script to download files from gofile.io
#!/bin/bash
url="$1"
#prompt for url if not provided
until [ ! -z "$url" ] ; do
read -p "url=" url
done
id=$(sed 's|.*gofile.io/d/||g' <<< "$url")
@leiless
leiless / ipv4_ipv6_doh_doq.md
Last active April 9, 2025 20:52
List of direct IPv4/IPv6 DoH/DoQ

dns.google / 8888.google

8.8.4.4
8.8.8.8
2001:4860:4860:0:0:0:0:64
2001:4860:4860:0:0:0:0:6464
2001:4860:4860:0:0:0:0:8844
2001:4860:4860:0:0:0:0:8888
@tonidy
tonidy / ISODate.go
Created May 11, 2022 23:05 — forked from lokeb/ISODate.go
Custom Date type with format YYYY-MM-DD and JSON decoder (Parser) and encoder (Unmarshal and Marshal methods)
//ISODate struct
type ISODate struct {
Format string
time.Time
}
//UnmarshalJSON ISODate method
func (Date *ISODate) UnmarshalJSON(b []byte) error {
var s string
if err := json.Unmarshal(b, &s); err != nil {
@mwouts
mwouts / _introducing_itables.md
Last active February 21, 2025 15:06
Pandas DataFrames as interactive HTML DataTables

Pandas DataFrames as interactive HTML DataTables

In Jupyter Notebook, Jupyter Lab, Google Colab, VS Code and PyCharm

Pandas DataFrames are central to Data Analysis in Python. In this post, we introduce the itables Python package that enhances how these DataFrames are displayed, by turning them into interactive HTML DataTables.


Using itables is as simple as

@bonnopc
bonnopc / multipleSSHkeysForUnix.md
Created November 23, 2021 17:06
Enable Multiple SSH Keys for MacOS/ Ubuntu/ Debian etc.

Enable Multiple SSH Keys for UNIX Based OS

Follow these steps below to enable multiple SSH keys on your device with UNIX Based OS (MacOS/ Ubuntu/ Debian etc.). Suppose, you have two different users/ accounts, one is personalAccount and another is companyAccount. And you have already a default key configured with personalAccount. (If you haven't set up your default ssh-key yet, please follow this article before going ahead with these steps described below.)

1. Generate another ssh-key

Generate a new ssh-key for your companyAccount.

cd ~/.ssh
ssh-keygen -t rsa -C "[email protected]"
@acdha
acdha / Podman as a Docker Desktop replacement.md
Last active July 13, 2024 06:05
Instructions for using Podman as a Docker.app replacement on MacOS

Podman as a Docker Desktop alternative

Prerequisites

  1. Install Homebrew from https://brew.sh

Install Podman

$ brew install podman
@YodaEmbedding
YodaEmbedding / .clang-format
Last active April 27, 2025 20:19
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@vancluever
vancluever / macos-big-sur-ssh-agent-local-no-disable-sip.md
Last active February 8, 2025 08:58
Run SSH Agent w/Modified Options (MacOS Big Sur, No Homebrew, No SIP Modification)

Run SSH Agent w/Modified Options (MacOS Big Sur, No Homebrew, No SIP Modification)

The following will show you how you can modify the startup options of the SSH agent supplied by MacOS in a non-invasive way. This can be useful for doing things like setting a key lifetime, which can then be used with AddKeysToAgent in your ~/.ssh/config to automate the timing out of saved keys. This ensures that your passphrase is re-asked for periodically without having to shutdown, re-log, or having it actually persisted in keychain, the latter being almost as bad as having no passphrase at all, given that simply being logged in is generally enough to then use the key.

This method does not modify the system-installed SSH agent service (com.openssh.ssh-agent), but rather duplicates its functionality into a user-installed launch agent where we can then modify the options. Modifying the system-installed service is becoming increasingly harder to do; SIP generally protects

@davidteren
davidteren / nerd_fonts.md
Last active April 27, 2025 13:47
Install Nerd Fonts via Homebrew [updated & fixed]