Skip to content

Instantly share code, notes, and snippets.

View metacritical's full-sized avatar
Creating Black holes.

Pankaj Doharey metacritical

Creating Black holes.
View GitHub Profile

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@rain-1
rain-1 / llama-home.md
Last active February 22, 2024 05:52
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@nat-418
nat-418 / why-tcl.md
Last active April 1, 2024 03:23
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages:

@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@metacritical
metacritical / headless-p5.md
Created August 15, 2021 12:07 — forked from dropmeaword/headless-p5.md
Headless processing

Running processing without a screen

Let's say you want to run a Processing sketch on a server. Like maybe you want to generate several million PDF and JPEG images using a handful of Amazon EC2 instances.

This is called “headless” mode, and to do so, it's necessary to install what's known as a virtual frame buffer.

On Ubuntu 14.04, these are the things you need to install first:

sudo apt-get install xvfb libxrender1 libxtst6 libxi6 
@borkdude
borkdude / router.clj
Last active April 9, 2024 15:03
Small ring router using core.mach in babashka
(require '[clojure.core.match :refer [match]]
'[clojure.string :as str]
'[hiccup2.core :refer [html]]
'[org.httpkit.server :as server])
(defn router [req]
(let [paths (vec (rest (str/split (:uri req) #"/")))]
(match [(:request-method req) paths]
[:get ["users" id]] {:body (str (html [:div id]))}
:else {:body (str (html [:html "Welcome!"]))})))
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@niw
niw / README.en.md
Last active February 13, 2024 04:24
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@andrebrait
andrebrait / keychron_linux.md
Last active April 25, 2024 13:24
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@cellularmitosis
cellularmitosis / README.md
Last active April 16, 2023 17:49
Quick-n-dirty QEMU script to spin up Debian on various CPU's