Skip to content

Instantly share code, notes, and snippets.

@apfelchips
apfelchips / choco_install.ps1
Last active April 18, 2024 18:01
chocolatey package install script
# allow running: Set-ExecutionPolicy Bypass -Scope Process -Force
# src: https://gist.github.com/apfelchips/792f7708d0adff7785004e9855794bc0
# goal: install all basic tools / pin software with working autoupdate mechanism / specialized stuff is commented out
# misc: Windows Store .appx downloader https://store.rg-adguard.net/
# Check Permissions
if ( -Not( (New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) ){
Write-Error -Message "Script needs Administrator permissions"
@apfelchips
apfelchips / defaults.duti
Last active June 7, 2025 18:15
set file-associations on macOS: ~/.config/duti/defaults.duti
# duti settings file
# src: https://gist.github.com/apfelchips/0073cb3e8d186115f590d318998c1025
# mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/duti/" && curl -L "https://git.io/JRtzH" -o "${XDG_CONFIG_HOME:-$HOME/.config}/duti/default.duti"
# duti-apply wrapper: alias duti-apply='duti -v "${XDG_CONFIG_HOME:-$HOME/.config}/duti"'
## duti documentation http://duti.org/documentation.html
## see also: https://github.com/Lord-Kamina/SwiftDefaultApps#readme
# List of MIME Types:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- documentation: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753582(v=vs.85)# -->
<!-- firefox extra html attributes: https://github.com/Chocobo1/slim_bookmarks/blob/gh-pages/js/slim_bookmarks.js -->
<!-- firefox place: URI https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Places_query_URIs -->
<!-- completely overrides firefox bookmarks -->
<!-- check for dead links: wget --no-config --spider --no-verbose --no-recursive --force-html -i $XDG_CONFIG_HOME/firefox/bookmarks.html -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>Bookmarks</title>
@apfelchips
apfelchips / user.js
Last active June 28, 2025 07:03
~ 🥖.config🥖firefox🥖Profiles🥖profile.default🥖user.js
// src: https://gist.github.com/apfelchips/f129c8316055e524774d757365267e26
// goal: disable all annoying stuff from firefox and tighten security, but still retain all modern web features
// configure as little as possible to benefit from changeing/hardened defaults by Mozilla
// inspired by:
// https://github.com/pyllyukko/user.js/blob/master/user.js
// https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js
// http://kb.mozillazine.org/About:config_entries
// https://gist.github.com/ruilapa/3207798