Skip to content

Instantly share code, notes, and snippets.

View aghecht's full-sized avatar

Alan Hecht aghecht

View GitHub Profile
@doop
doop / macmini.md
Last active November 3, 2025 15:53
Installing linux on a 2011 Intel mac mini

Installing linux (Debian) on a 2011 Intel mac mini

Apple have long stopped supporting the mid-2011 mac mini I had sitting in the living room, so rather than contribute to the e-waste problem I decided to stick linux on it. The general consensus seems to be that you should keep macOS bootable to make it easier to deal with any firmware issues down the line, so I wanted to set it up to dual boot. The documentation I was able to find on how to do this seemed scattered or out of date.

There are a number of little wrinkles to this process:

  • macOS quite reasonably assumes it'll be the only thing running on the machine; you need to install a boot manager to let you choose between macOS, linux, or whatever else. I went with rEFInd.
  • Something seems a bit off with the default video setup, such that when I first booted into Debian the screen went blank immediately after enabling kernel modesetting.
  • The mac mini wifi uses a Broadcom chipset with non-free drivers which you have to download separately. I s
@dhh
dhh / linux-setup.sh
Last active October 30, 2025 22:31
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@milnak
milnak / ubuntu20-hyperv-enhanced-session.md
Last active November 30, 2025 03:30
Enabling enhanced session in Hyper-V for Ubuntu 20: This works for me, although it seems that Hyper-V quick create now supports enhanced session by default. #windows

Setup Hyper-V enhanced session for Ubuntu 20

I couldn't find instructions that were 100% complete, so I put this together.

These instructions worked fine for me. Follow each step carefully.

Download Ubuntu 20 desktop

DO NOT create the VM by choosing Quick Create in Hyper-V Manager. Follow these instructions exactly.

@sivinnguyen
sivinnguyen / wsl2_200915_fix_dns_resolution.md
Last active July 13, 2025 15:48
Fix DNS resolution in WSL2

Error

$ sudo apt-get update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure in name rerolution

$ host google.com
;; connection timed out; no servers could be reached
@swalkinshaw
swalkinshaw / tutorial.md
Last active October 24, 2025 14:52
Designing a GraphQL API
@danwhitston
danwhitston / wsl_first_time_setup.sh
Last active May 7, 2022 13:34
Setting up my WSL environment - includes git & key, rbenv, rbenv ruby-build, attis, imagemagick, ruby, bundler, mysql, mongodb, redis
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
ln -s "/mnt/c/Users/Daniel/Documents/homeflow" ~/homeflow
ln -s "/mnt/c/Users/Daniel/Documents" ~/documents
mkdir .ssh
cp documents/id* .ssh/
sudo chmod 600 .ssh/*
cd homeflow/attis
git pull
@hopsoft
hopsoft / model_supports_bulk_updates.rb
Last active December 8, 2020 17:08
ActiveRecord Bulk / Batch Update
# frozen_string_literal: true
module ModelSupportsBulkUpdates
extend ActiveSupport::Concern
module ClassMethods
# Performs a bulk update with an efficient single query for all the records in the list.
# Note that the records are not reloaded form the database.
# This means that ActiveRecord will still see these records as dirty after the bulk_update.
def bulk_update(records)
@mshkrebtan
mshkrebtan / webex-ubuntu.md
Last active October 28, 2022 15:23
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev