Skip to content

Instantly share code, notes, and snippets.

View Dids's full-sized avatar
🏠
Working from home

Pauli Jokela Dids

🏠
Working from home
View GitHub Profile
@Dids
Dids / Compile_Go_for_Apple_Silicon_M1.md
Last active September 25, 2023 01:55
Compile Go for Apple Silicon (M1)

NOTICE: This guide is no longer relevant, as a lot has changed over time and Go supports Apple Silicon natively just fine now!

Compile Go for Apple Silicon (M1)

Follow these short instructions on how to compile Go for Apple Silicon (M1). From here on out, we may simply refer to it as the "ARM device".

This entire process should only take about 5-10 minutes, but please read through everything carefully, in order to avoid any potential issues along the way.

Note that at the time of writing this, Go was not yet officially available for Apple's ARM.

@niw
niw / README.en.md
Last active May 10, 2024 05:50
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
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
@Jensderond
Jensderond / Makefile
Created July 15, 2020 10:48
Clean up old certificates Traefik - Tested with Traefik 2.2.x
acmefile = acme.json
traefik_dashboard = <TRAEFIK_DASHBOARD_URL>
auth_user = <USERNAME>
auth_password = <PASSWORD>
.SILENT: clean
.PHONY: clean
clean:
curl -s "https://$(auth_user):$(auth_password)@$(traefik_dashboard)/api/http/routers" | jq -r ".[]" | jq ".rule" | sed "s/\"Host(\`//g;s/\`)\"//g" | uniq > existing_frontends;
cat $(acmefile) | jq ".default.Certificates[].domain.main" | sort | uniq | sed "s/\"//g" > existing_certs;
@rikka0w0
rikka0w0 / ipxe_build.md
Last active May 10, 2024 15:42
Build IPXE

1. Install tools and config IPXE

# Install compiler and dependencies
sudo apt-get install -y git gcc make liblzma-dev

# Grab the source code
git clone https://github.com/ipxe/ipxe.git
cd ipxe/src

# Enable NFS support
@rikka0w0
rikka0w0 / pxe_win10_winpe.md
Last active May 5, 2024 23:31
Boot Windows 10 and WinPE from PXE (IPXE)

Pre-requests:

  1. TFTP server
  2. IPXE Make sure ipxe.lkrn is in the TFTP root.
  3. iSCSI target (Server) Assume we have an iSCSI target "1:net.cszombie.au:windows" that is ready to be connected. 1 is LUN id, "net.cszombie.au:windows" is the target name.
  4. HTTP server (To speed up loading boot.wim, http is faster than tftp, http is supported by IPXE, however this is optional)

1. Download wimboot to the root of the TFTP server

2. Create scripts:

@jfuerth
jfuerth / xorg.conf
Last active May 12, 2024 22:01
Separate X11 screens on dual-head Raspberry Pi
# Sets up Xorg on Raspberry Pi 3b in FKMS mode for two screens.
#
# To put the Pi into FKMS mode, add one of the following lines to /boot/config.txt:
# 1. "fake" KMS mode (exposes the proprietary vc4 firmware driver via KMS API):
# dtoverlay=vc4-fkms-v3d
# If you wanted "full" KMS mode, fully open source "vc4" driver in the Linux kernel, you
# would use `dtoverlay=vc4-kms-v3d` instead, but then the identifiers in the Driver section
# need to be different.
#
# To run X clients on one screen or another:
@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active December 6, 2023 20:42
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
@fabianfett
fabianfett / Change Xcode version in GitHub Actions
Created August 21, 2019 09:37
How to change the Xcode version in GitHub Actions
# Change Xcode version in GitHub Actions
As of today (2019-08-21) I haven't found any documentation on changing Xcode versions when
using GitHub actions. So I checked the applications folder and everything we need is
already there. 🤩
```
> ls -n /Applications/ | grep Xcode*
lrwxr-xr-x 1 0 80 30 Aug 2 19:31 Xcode.app -> /Applications/Xcode_10.2.1.app
drwxr-xr-x 3 501 20 96 Oct 20 2018 Xcode_10.1.app
@wess
wess / gist:c66382198d48238787718b9bb8e9f3d9
Created July 30, 2019 21:07
Start/End GCodes for BLTouch Ender 3
; Ender 3 Custom Start G-code
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M104 S160; start warming extruder to 160
G28 ; Home all axes
G29 ; Auto bed-level (BL-Touch)
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature