Skip to content

Instantly share code, notes, and snippets.

View JotaRata's full-sized avatar
💥

JotaRata

💥
  • 04:13 (UTC -04:00)
View GitHub Profile
@arbaes
arbaes / atomic-arch-check.sh
Last active August 7, 2026 16:56
Atomic Arch vulnerability scan (atomic-lockfile injection checker)
#!/usr/bin/env bash
# Atomic Arch / atomic-lockfile AUR campaign check
# Sources:
# - https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/FGXPCB3ZVCJIV7FX323SBAX2JHYB7ZS4/
# - https://www.sonatype.com/blog/atomic-arch-npm-campaign-adds-malicious-dependency
# - https://ioctl.fail/preliminary-analysis-of-aur-malware/
set -uo pipefail
# Malicious npm dep names this campaign rotates through, plus the payload path.
IOC_NAMES='atomic-lockfile|js-digest|lockfile-js|nextfile-js|src/hooks/deps'
@karpathy
karpathy / microgpt.py
Last active August 16, 2026 02:09
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp

How to Speed Up Firefox on Linux: The Ultimate Guide 🚀

If you’re a Linux user like PewDiePie (yes, he uses Linux and loves a fast Firefox!), you probably want your browser to launch quickly and run smoothly. Firefox is powerful and privacy-respecting, but sometimes it can feel sluggish out of the box.

Don’t worry - I’ve gathered the best tips and tricks to supercharge your Firefox on Linux. Whether you want faster startup times, smoother browsing, or just a snappier experience, this guide has you covered.


1. Keep Firefox Updated 🔄

@JotaRata
JotaRata / ztfutils.py
Last active June 27, 2024 01:12
ZTF Forced Photometry service utilities
import math
import re
from typing import Literal
import numpy as np
import pandas as pd
import requests
import multiprocessing
from multiprocessing.pool import ThreadPool
import os
@JotaRata
JotaRata / stubs.py
Last active January 8, 2025 20:04
Auto stub generator for Cython files
'''
Auto stub generator for cython files.
LIMITATIONS:
Can only parse declared cdef variables with public/readonly keywords
Cannot parse plain defined variables (ex: "my_var = 2")
Cannot parse special members imported from C/C++
Cannot parse ctypedef types
Can only parse functions prefixed with 'def' and 'cpdef
@Anthelmed
Anthelmed / WorldSpaceUIDocument.cs
Last active July 19, 2026 21:03
Until Unity decide to make it official, this is a custom WorldSpaceUIDocument component. Code is under the MIT license: https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
using UnityEngine.UIElements;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem.UI;
#endif
#if UNITY_EDITOR
using UnityEditor;
@JotaRata
JotaRata / TextEditor.cs
Last active April 26, 2024 21:14
A really really simple text editor for Unity
/*
This is a really simple text editor to be used within Unity
It's useful to write memos, notes or ideas inside your Unity Editor window
Kinda like Blender's Text Editor
*/
using UnityEngine;
using UnityEditor;
using System;
using System.IO;
@dmentipl
dmentipl / phantom-mcfost-post-processing.rst
Last active April 28, 2025 05:09
Post-processing Phantom dump files with MCFOST
@ljw1004
ljw1004 / tuple_perf.cs
Created April 20, 2017 15:02
Perf comparison ValueTuple vs Tuple vs KeyValuePair
// TUPLE MICRO-BENCHMARKS, based on https://www.dotnetperls.com/tuple-keyvaluepair
//
// Tuples are generally fastest.
// ValueTuple is fastest in the particular case of GetHashCode.
// KeyValuePair is always worst.
//
//
// RAW RESULTS
// Numbers in milliseconds (lower is better)
//
@jhazelwo
jhazelwo / fail.py
Last active December 2, 2024 13:29
Supress traceback for custom Python exceptions
#!/usr/bin/env python3
""" -*- coding: utf-8 -*-
Example Python3 Raise Exception without Traceback
Example Python3 Hide Traceback
Python3 Custom Exception Class
Python3 custom exception suppress traceback example
Python3 custom exception without traceback example
Example Python Raise Exception without Traceback
Example Python Hide Traceback
Python Custom Exception Class