Skip to content

Instantly share code, notes, and snippets.

View Lutzifer's full-sized avatar

Wolfgang Lutz Lutzifer

View GitHub Profile
@madebyollin
madebyollin / stable_diffusion_m1.py
Last active February 10, 2024 02:25
Stable Diffusion on Apple Silicon GPUs via CoreML; 2s / step on M1 Pro
# ------------------------------------------------------------------
# EDIT: I eventually found a faster way to run SD on macOS, via MPSGraph (~0.8s / step on M1 Pro):
# https://github.com/madebyollin/maple-diffusion
# The original CoreML-related code & discussion is preserved below :)
# ------------------------------------------------------------------
# you too can run stable diffusion on the apple silicon GPU (no ANE sadly)
#
# quick test portraits (each took 50 steps x 2s / step ~= 100s on my M1 Pro):
# * https://i.imgur.com/5ywISvm.png
@IsaacXen
IsaacXen / README.md
Last active November 3, 2024 04:19
(Almost) Every WWDC videos download links for aria2c.
@javiribera
javiribera / gist:3c1cbb0f2831d42d83bb2473188e3fac
Created March 15, 2020 17:10
Download entire iCloud shared albums icloud-album-download.sh
#!/bin/bash
# requires jq
# arg 1: iCloud web album URL
# arg 2: folder to download into (optional)
#
# Credits: https://gist.github.com/zneak/8f719cd81967e0eb2234897491e051ec
# icloud-album-download.sh
function curl_post_json {
@brokensandals
brokensandals / net.brokensandals.photos.sync.applefromgoogle.plist
Created September 19, 2017 03:22
script & launchd config for importing photos from a folder into the Photos app on Mac
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.brokensandals.photos.sync.applefromgoogle</string>
<key>Program</key>
<string>/Users/jacob/dotfiles/bin/sync-apple-photos-from-google-photos.rb</string>
<key>StartCalendarInterval</key>
<array>
@marcoarment
marcoarment / parallelize.c
Last active August 12, 2024 08:09
A simple shell command parallelizer.
/* parallelize: reads commands from stdin and executes them in parallel.
The sole argument is the number of simultaneous processes (optional) to
run. If omitted, the number of logical CPUs available will be used.
Build: gcc -pthread parallelize.c -o parallelize
Demo: (for i in {1..10}; do echo "echo $i ; sleep 5" ; done ) | ./parallelize
By Marco Arment, released into the public domain with no guarantees.