Skip to content

Instantly share code, notes, and snippets.

@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@khvn26
khvn26 / steamos-vscode-docker-guide.md
Last active April 24, 2024 18:38
SteamOS VSCode + Docker guide

SteamOS VSCode + Docker guide

  1. Install Docker:

    sudo pacman -S docker
  2. Enable Docker systemctl unit:

@oledid
oledid / turn-off-screen.ps1
Created September 24, 2015 07:15
PowerShell: Turn off computer screen
# Source: http://www.powershellmagazine.com/2013/07/18/pstip-how-to-switch-off-display-with-powershell/
# Turn display off by calling WindowsAPI.
# SendMessage(HWND_BROADCAST,WM_SYSCOMMAND, SC_MONITORPOWER, POWER_OFF)
# HWND_BROADCAST 0xffff
# WM_SYSCOMMAND 0x0112
# SC_MONITORPOWER 0xf170
# POWER_OFF 0x0002
@Denbergvanthijs
Denbergvanthijs / donut.py
Last active April 24, 2024 18:36
3D spinning donut in Python. Based on the pseudocode from: https://www.a1k0n.net/2011/07/20/donut-math.html
import numpy as np
screen_size = 40
theta_spacing = 0.07
phi_spacing = 0.02
illumination = np.fromiter(".,-~:;=!*#$@", dtype="<U1")
A = 1
B = 1
R1 = 1
@JoschD
JoschD / cern_afs_kerberos_wsl2.md
Last active April 24, 2024 18:35
AFS in WSL2 for CERN realm

AFS Kerberos at CERN from inside WSL2 (Ubuntu 20.04)

Trying to get openAFS running on WSL2 following the regular guides from OmeGak and twiki ended for me in

aklog: a pioctl failed while obtaining tokens for cell cern.ch
@jacksonthall22
jacksonthall22 / main.py
Last active April 24, 2024 18:34
Encoding position using occupancy and a mapping of piece triplets
from typing import Iterable
import itertools
import chess
pieces = [chess.Piece(p_type, c) for c in chess.COLORS for p_type in chess.PIECE_TYPES]
NUM_PIECES_IN_GROUP = 3
groups = list(itertools.product(pieces, repeat=NUM_PIECES_IN_GROUP))
BINARY_WIDTH = (len(groups) - 1).bit_length()
{ pkgs, lib, config, ... }: with lib.types;
let
postgresqlInstanceType = submodule {
options.connectionString = lib.mkOption {
type = str;
};
};
@xeoncross
xeoncross / Positive-Adjective-List.txt
Created February 23, 2016 19:19
Positive Adjective List
Positive Adjective List
abundant
accessible
accommodative
accomplished
accurate
achievable
adaptable
adaptive
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 24, 2024 18:32
crack activate Office on mac with license file
@dghubble
dghubble / kubeception.md
Last active April 24, 2024 18:29
Running QEMU/KVM and Nested Kubernetes on Bare-Metal Kubernetes