Skip to content

Instantly share code, notes, and snippets.

View DanBurkhardt's full-sized avatar
👓
building Kassandra, a macOS AR app for Nreal Air.

Dan Burkhardt DanBurkhardt

👓
building Kassandra, a macOS AR app for Nreal Air.
View GitHub Profile
@DanBurkhardt
DanBurkhardt / UIViewController+LoadingAnimation.swift
Last active January 5, 2023 18:33
Extension for UIViewController to show a loading indicator centered within the main view using frame animation built into UIImageView.
// UIViewController+LoadingAnimation.swift
//
// Created by GigabiteLabs on 4/16/20
// Swift Version: 5.0
//
// Description:
// An extension for UIViewController using gif-like frame animation support
// in UIImageView to show a loading indicator centered within the main view.
@DanBurkhardt
DanBurkhardt / sync-steamdeck-screenshots
Last active September 21, 2022 20:30
A sync script example for Steam Deck that syncs game screenshots to a common directory, which is backed up to the the cloud (Synology Drive in my case).
#!/bin/bash
# Licensed MIT, see bottom of file.
# setup vars
STEAM_USERID="YOUR_NUMERIC_USERID"
# Setup source directory vars
# Note: Games like AC Odyssey don't use the same sync dir so you have
# to sleuth in desktop mode to find the right directory
## Games
@DanBurkhardt
DanBurkhardt / convert-webp-add-wallpapers.sh
Last active February 10, 2022 19:13
Copy & Convert .webp Images to Ubuntu Wallpapers Dir
#!/bin/bash
MSG='Click "add picture" at the top of the window, navigate to "/usr/share/backgrounds", select all images and click done.'
# convert all to jpg
printf "\nconverting all .webp to .jpg.."
for x in ls *.webp; do ffmpeg -loglevel panic -i $x ${x%.webp}.jpg; done
# copy to system wallpaper directory
printf "\ncopying images to system backgrounds folder.."
@DanBurkhardt
DanBurkhardt / whomst.sh
Last active March 29, 2023 13:32
Whomst: an alias for those whomst.
#!/bin/bash
# Licensed under MIT, see license below.
cat << "EOF"
###########################################
# _ _ _ _ #
# | | | | | | | #
# | | | | |__ ___ _ __ ___ ___| |_ #
# | |/\| | '_ \ / _ \| '_ ` _ \/ __| __| #
@DanBurkhardt
DanBurkhardt / ps-batch-ios-assets.jsx
Last active September 27, 2020 08:24
Photoshop Automation: batch resize & export images for Xcode .xcassets catalogs as @1x, @2x, @3x resolution versions from @3x source images.
// batch-export-ios-assets.jsx
// Licensed under MIT. See below.
//
// Tested with: macOS 10.15.6, Adobe Photoshop 2020 v21.2.3 Release
//
// Description:
// A JS script that enables simple automated *batch* exporting for
// images in the @1x, @2x, @3x sizes required for Xcode .xcasset catalogs
//
// This script makes a few assumptions, you should either adjust
@DanBurkhardt
DanBurkhardt / install-sshpass.sh
Last active February 16, 2024 14:05
a simple script to install "sshpass" on macOS
# Install "sshpass" on macOS.
#
# - sshpass allows you to easily automate password entry
# prompts for ssh sessions.
#
# Don't mess around with terminal if you
# don't know what any of this means, please.
# Evaluate for learning purposes at your own risk.
#
# Licensed under MIT. See below.
@DanBurkhardt
DanBurkhardt / README.md
Created October 10, 2019 08:44
Xcode Server Web UI - Disable 'Integrate' button for all users on bots web page

Xcode Server - Disable "Integrate" button access for /Xcode web page

License: MIT

disclaimer

this is for experiemntal use only do not use this if you don't know what you're doing you could do something bad or irreversible, idk, read the script first and see if it looks alright to run

Problem: When you visit {xcodeserver}.com/xcode there is this terrible little button there named "integrate". Xcode Server doesn't have any web UI configuration options whatsoever. None, literally nothing.

@DanBurkhardt
DanBurkhardt / gist:2d369692b24b7076ce4c0a6daf1acfc2
Last active August 4, 2019 05:44
Edit Xcode build concurrency settings
defaults write com.apple.dt.xcodebuildPBXNumberOfParallelBuildSubtasks 12
defaults write com.apple.dt.xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 12
defaults write com.apple.dt.xcode PBXNumberOfParallelBuildSubtasks 12
defaults write com.apple.dt.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 12