Skip to content

Instantly share code, notes, and snippets.

@fraune
fraune / touch_id_sudo.sh
Last active December 27, 2023 05:49
Enable a Macbook's Touch ID to authorize the `sudo` command in MacOS Terminal
sudo grep -q -F 'auth sufficient pam_tid.so' /etc/pam.d/sudo || sudo sed -i '' '2i\
auth sufficient pam_tid.so
' /etc/pam.d/sudo
@izuolan
izuolan / worker.js
Last active July 6, 2023 15:15
Custom domain for your Craft.do pages. Demo: https://next-craft.vercel.app and Tutorial: https://zuolan.me/en/next_craft_en
// Your domain name
const MY_DOMAIN = 'note.example.com'
// Website language
const LANG = 'en'
// Favicon url
const FAVICON_URL = 'https://example.com/favicon.ico'
// Your config page link

How to install Minecraft natively on Apple Silicon, the easiest way possible

1 - Download MultiMC from here

2 - Download Azul Zulu JDK from here (The version you want is Java 17, arm64, macOS, and you download the ZIP file.) Extract the ZIP file, open the folder and copy "zulu-17.jdk" to your home folder.

3 - Download tanmayb123's Minecraft on Apple Silicon package from here. Extract the ZIP and from the folder you are going to copy two files. One, the folder "lwjglnatives", and two, open the Libraries folder and copy "lwjglfat.jar". Move these to your home folder.

4 - Open MultiMC and create a new instance. Right click your instance and click edit instance. Make the following changes:

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package

@jakob-stoeck
jakob-stoeck / brew-upgrade-parallel.sh
Last active February 26, 2024 07:07
homebrew parallel download and update
brew outdated | parallel --keep-order brew fetch --deps && brew upgrade
# without GNU parallel (output will be out of order):
brew outdated -q | xargs -L1 -P8 brew fetch --deps
@alandsilva26
alandsilva26 / GCC.md
Last active June 7, 2024 18:40
Instructions for installing GCC Compiler on Windows

Installation

To check if GCC already exists by running the following command in your command promt gcc -v

  • Install MSYS2 MSYS2.

  • This will install the linux shell on your Machine.

  • Update packages and mirrors using pacman -Syu.

  • You may have to restart

  • To install GCC copy the following code and paste in the shell Ctrl + v might not work

  • Note: Keep pressing ENTER to select the default installation instructions.

@furdarius
furdarius / rkn_unblock.md
Last active January 10, 2024 19:08
Настройка обхода РКН на роутере

Running Gitlab-CI and Minio with docker-compose

features

method

Generate some random string for minio

</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c32; echo ""
@ankjevel
ankjevel / clear-cache.sh
Last active April 18, 2024 08:31
clear npm cache (when using nvm); run with `nvm list | clear-cache`
#!/usr/bin/env bash
function clear-cache {
versions=()
while read -r line; do
clean="$(echo ${line} | sed "s,$(printf '\033')\\[[0-9;]*[a-zA-Z],,g")"
valid=$(echo "${clean}" | grep '^[^a-zA-Z]' | grep -v 'system' | sed 's/->//' | sed 's/\s.*v//')
if [[ ! -z $valid ]]; then
versions+=(${valid})
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active June 16, 2024 11:47
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup