Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
matthewjberger / instructions.md
Last active January 5, 2025 18:34
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@cherepanov
cherepanov / I21_dualos_pipo_BIOS.rom
Last active January 5, 2025 18:25
ubuntu 24.04 on Pipo X9
This file has been truncated, but you can view the full file.
from ursina import *
from time import time as time_lib
# Start Ursina app
app = Ursina()
# Set FPS limit to 60
application.fps_limit = 60 # Limit the FPS to 60
# Set up FPS camera
from ursina import *
import time
app = Ursina()
# Player settings
player_speed = 5
jump_speed = 10
run_speed = 10
rate_of_fire = 0.5 # seconds between shots
@namidairo
namidairo / MiWifi-Updates.py
Last active January 5, 2025 18:15
Re-implementation of miwifi router update check.
import requests
import datetime
import base64
import hashlib
# Dummy values, countryCode required if querying EU servers
# Most important here are the hardware and channel
params = {
#"countryCode": "EU",
"deviceID": "",
@gnaaruag
gnaaruag / badges.md
Last active January 5, 2025 18:15
A collection of a few markdown badges from shields.io

I have faced this problem, when i need badges to put on github repository/profile readmes,i always have to spend some time getting them right/finding the right badges

So heres a few badges so that they can be pasted right into the readme files

Most badges display a not found message, to correct it add your repository/profile names, it should work just fine

Remember to replace USERNAME, REPO_NAME with your actual GitHub username, repository name, respectively. Additionally, you can modify the styles or customizations of these badges according to your preferences or specific needs.

Repository Stats

  • Repo Size: ![GitHub repo size](https://img.shields.io/github/repo-size/USERNAME/REPO_NAME)
@slavistan
slavistan / cuda-ready-archlinux-for-wsl2.md
Last active January 5, 2025 18:14
CUDA-ready Archlinux for WSL2

This is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.

As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!

1. Install Archlinux

  1. Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.

Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.

@jboner
jboner / latency.txt
Last active January 5, 2025 18:14
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@devnoname120
devnoname120 / My macOS setup.md
Last active January 5, 2025 18:12
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Quality of life improvements

Mouse: