Skip to content

Instantly share code, notes, and snippets.

View versionsix's full-sized avatar
🦖
Using modern software.

Frank Meeusen versionsix

🦖
Using modern software.
  • Belgium, Antwerp
View GitHub Profile
@jn0
jn0 / patch.py
Last active August 13, 2022 09:04
Two-pass multi-run-safe micro (85 LOC) patcher in python
View patch.py
#!/usr/bin/env python3
'''
Two-pass re-run safe micro (85 LOC) patcher in python.
Sample patch config (yes, it's in YAML):
---->8----
version: 0
title: tribute to sublimetext_4126_crack_linux.py by dmknght @github
file: /tmp/sublime_text
# size: 8862888 # optional check for file size
@versionsix
versionsix / README.md
Created November 19, 2021 19:58 — forked from zerok/README.md
OmniGraffle: Export layers on top of base-layer as PNG
View README.md

Layer export for OmniGraffle

If you have a Graffle document (doc.graffle) with a canvas named "mycanvas" holding the following layers ...

  • Extra 3
  • Extra 2
  • Extra 1
  • Base

... then these images will be generated:

View How to make Monterey Installer ISO.md

How to create a Bootable Monterey ISO

set -e
set -u

# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Monterey" -layout SPUD -fs HFS+J

# Rename to .img since this isn't a compressed disk image
@gabrieloc
gabrieloc / Bash.swift
Last active April 21, 2022 17:40
Utilities for writing command line code in Swift
View Bash.swift
#!/usr/bin/env swift
import Foundation
struct TerminationStatus: Error {
let code: Int32
}
func run(_ command: Command) throws {
print(command.rendered.joined(separator: " "))
@jthodge
jthodge / universal-switcher
Created September 6, 2020 22:07
Show macOS app switcher across all monitors
View universal-switcher
defaults write com.apple.Dock appswitcher-all-displays -bool true
killall Dock
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active September 19, 2023 21:12
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
View install_xelatex_on_mac.txt
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@partrita
partrita / 5myzsh.md
Last active March 23, 2021 11:57
personal set up of zsh.
View 5myzsh.md

0. pre-required

bash shell

1. install zsh

The Z shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements

@rickbassham
rickbassham / README.md
Last active May 2, 2023 18:38
Step by Step Instructions to create an Open Source Astro-Imaging Computer
View README.md

Instructions (works on amd64 and arm64)

A copy/paste guide to getting a full working astro-imaging computer running on Ubuntu 20.04 LTS. Installs latest stable versions of gpsd, KStars, INDI, OACapture, SkyChart, ASTAP, and Astrometry.net.

It uses the lightweight XFCE4 desktop, and allows you to VNC in, running everything locally on the astro-imaging pc.

Install Ubuntu Server 20.04.1

@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active September 12, 2023 14:37
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen
View WSL2GUIXvnc-en.md

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is tigervnc-standalone-server.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working WSL2 installation.

View RemoveSpotlightExclusion.sh
#!/bin/bash
# We can find the index of the item in the array by extracting the key, finding the lines with
# 'string' in them, and then finding the search string.
cd /System/Volumes/Data/.Spotlight-V100
search_string=$1
let index="`plutil -extract Exclusions xml1 -o - VolumeConfiguration.plist | grep string | grep -wn "${search_string}" | cut -d ':' -f 1` - 1"