Skip to content

Instantly share code, notes, and snippets.

@Steveplays28
Steveplays28 / distant_horizons_shader_compatibility_information.md
Last active April 28, 2025 14:42
Distant Horizons shader compatibility info

Distant Horizons shader compatibility information

Distant Horizons v2.0.0 (and up) shader compatibility information.

v2

Install guide

Fabric

@nfalliere
nfalliere / DartSnapshotHashToVersionTag.txt
Last active January 17, 2025 01:08
List of Dart snapshot version hash (internal version) to version tag (public git tag)
# note: the hash is located at offset 0x14, after the int32 magic (0xDCDCF5F5), int64 size, and int64 snapshot kind fields.
# last update: 2025/01/07
# snapshot_hash,dart_version_tag
19ac30c2bacca37ef7691604e75be559,2.0.0
d120342d48b35fc67901acb723bb6e9f,2.0.0-dev.0.0
d120342d48b35fc67901acb723bb6e9f,2.0.0-dev.0.1
53db5f61774a5fbc5ee04696b38726f8,2.0.0-dev.1.0
3cebf13e885ccde5bf5d36d308390ddf,2.0.0-dev.10.0
4980a5a9e7247ed5f306c8c565d193cc,2.0.0-dev.11.0
8ed2b9130065c72a181a9a40e17387bd,2.0.0-dev.12.0
@skl
skl / iosProximityObserver.swift
Created May 29, 2020 11:49
iOS SwiftUI proximity observer example
import SwiftUI
import UIKit
class ProximityObserver {
@objc func didChange(notification: NSNotification) {
print("MyView::ProximityObserver.didChange")
if let device = notification.object as? UIDevice {
print(device.proximityState)
}
}
@jessedc
jessedc / gist:12a74aff88d06e669cf1c9999408c62c
Created January 13, 2019 00:22
xcodebuild --help ExportOptions.plist organised in a more logical way
ExportOptions.plist - Options in a better order
Xcodebuild manfile says the following
> **Distributing Archives**
> The -exportArchive option specifies that xcodebuild should distribute the archive specified by -archivePath using the options specified by
> -exportOptionsPlist. xcodebuild -help can print the full set of available inputs to -exportOptionsPlist. The product can either be uploaded to Apple or
> exported locally. The exported product will be placed at the path specified by -exportPath.
The following is the list of settings (as of Xcode 10.1) output by `xcodebuild --help` but in a more logical order.
@UniversalSuperBox
UniversalSuperBox / cause-panic.conf
Created March 9, 2018 22:01
Upstart job to cause a kernel panic accidentally on purpose
start on startup
script
sleep 30
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
end script
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active April 27, 2025 12:53
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@wassname
wassname / to_filename.py
Last active March 14, 2025 09:54
python convert string to safe filename
"""
Url: https://gist.github.com/wassname/1393c4a57cfcbf03641dbc31886123b8
"""
import unicodedata
import string
valid_filename_chars = "-_.() %s%s" % (string.ascii_letters, string.digits)
char_limit = 255
def clean_filename(filename, whitelist=valid_filename_chars, replace=' '):
@z3ntu
z3ntu / README.md
Last active December 19, 2024 09:52
KDE 1 Arch Linux install guide
@silvestrpredko
silvestrpredko / InterceptRequest.java
Last active April 10, 2020 13:48
Append parameters to POST in Intercept(OkHttp)
/**
* @param parameter - this is string that contains parameters for Http POST
* @param request - old Request
* @return - new {@link Request} with additional parameters
* */
public static Request interceptRequest(@NotNull Request request, @NotNull String parameter)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@audreyfeldroy
audreyfeldroy / pypi-release-checklist2.md
Last active February 6, 2025 20:00
My PyPI Release Checklist 2 (now with bumpversion)
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be patch or major)
bumpversion minor