Skip to content

Instantly share code, notes, and snippets.

View cpietsch's full-sized avatar
💭
in the void

Christopher Pietsch cpietsch

💭
in the void
View GitHub Profile
@heiso
heiso / printer.cfg
Last active April 7, 2024 21:29
Klipper printer config - Artillery Genius (MKS gen L)
[include mainsail.cfg]
[gcode_macro _CLIENT_VARIABLE]
variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False]
variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X
variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y
variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
variable_retract : 1.0 ; the value to retract while PAUSE
variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
variable_speed_retract : 35.0 ; retract speed in mm/s
@Quasimondo
Quasimondo / sd15_vae_merge.py
Created October 22, 2022 15:23
Quick script to merge finetuned StabilityAI autoencoder into RunwayML Stable Diffusion 1.5 checkpoint
import torch
#USE AT YOUR OWN RISK
#local path to runwayML SD 1.5 checkpoint (https://huggingface.co/runwayml/stable-diffusion-v1-5)
ckpt_15 = "./v1-5-pruned-emaonly.ckpt"
#local path to StabilityAI finetuned autoencoder (https://huggingface.co/stabilityai/sd-vae-ft-mse)
ckpt_vae = "./vae-ft-mse-840000-ema-pruned.ckpt"
@averad
averad / Stable_Diffusion.md
Last active March 6, 2024 17:05 — forked from harishanand95/Stable_Diffusion.md
Stable Diffusion on AMD GPUs on Windows using DirectML
import copy
import os
import click
import numpy as np
import PIL.Image
import PIL.ImageOps
import torch
import dnnlib
import legacy
from tqdm import tqdm
@MarsMSJ
MarsMSJ / WebM_to_ProRes.md
Last active March 28, 2024 17:17
Convert your WebM (VP9) files to ProRes

Convert your WebM to ProRes

Like many of you lucky enough to purchase a PS5, I have been enjoying my time with the new console. One feature I started playing with is the video game capture feature via the "Create" button. I have been capturing my favorite clips here and there and selected the best ones to include a video I want to share. Unfortunately, I ran into trouble. None of my video editing applications (FCPX, DaVinci) support the WebM container. My favorite clips were all captured using WebM.

If you like me have all your favorite clips stuck in WebM then I have a solution for you. FFmpeg! This free software includes a ProRes encoder that simple enough to use works on Davinci Resolve (free version available) and Adobe Premiere! (FCPX of course supports ProRes.) See links below.

MacOS (and Linux)

On the MacOS, you can use the following command (Bash) to convert all WebM files in the current directory to ProRes.

@alecjacobson
alecjacobson / denoise.sh
Last active July 31, 2023 10:05
Remove background audio noise from a video clip via the command line (using ffmpeg and sox)
#!/bin/bash
if [ -z "$2" ];then
echo 'USAGE:
denoise input.mov output.mov
OR
denoise input.mov output.mov [ambient-noise-start-time] [ambient-noise-duration] [sox-noisered-amount] [sox-norm-param]
@vogler
vogler / Artillery-Genius.md
Last active December 27, 2023 12:48
Artillery Genius Config

image

Software

  • Mainboard firmware: Marlin 2.0.9.2 (fork with config, see Marlin/Configuration{,_adv}.h)
    • diff: nvim -d {Marlin,config/Artillery/Genius}/Configuration.h, same for Configuration_adv.h
      • mostly calibration, new extruder and noise-free PWM for parts fan
      • LIN_ADVANCE instead of S_CURVE_ACCELERATION (don't work together)
    • before 13.11.2020: Marlin 2.0.5.3 (3dprintbeginner) (branch)
  • TFT firmware: artillery_tft_fw_1.27.x_patch_9.2 (digant@thingiverse) (TFT-config.ini)
    • Put in Marlin mode (long press, persists on reboot) when printing with OctoPrint because TFT shares serial connection.
@gka
gka / .gitignore
Last active August 31, 2023 14:44
covid19 berlin cases
.Rhistory
.Rproj.user
covid19-berlin.Rproj
.Renviron

Kiosk Mode macOS

  1. Create two user accounts
    • Administration account
    • Kiosk Account - This account will be locked down with Parental Controls
  2. Set up remote management
  3. Install kiosk software
  • We use a role-based Apple ID (ex: webmaster@[institution].org) to manage macOS software. Managing Apps this way saves lots of headaches.
@veltman
veltman / tiles.md
Last active September 27, 2019 22:12
Making a big image zoomable

Making a big image zoomable

When you have a giant image and you want to make it easy to pan and zoom without downloading the whole 50MB image into someone's browser, a nice workaround is to cut that image into tiles at different zoom levels and view it as it were a map. An example where I've used this technique is The "Snowpiercer" Scenario.

One way to cut your big image into the requisite tiles is with gdal2tiles.py.

Alternatively, this Node script will do the cutting after you install node-canvas and mkdirp:

const fs = require("fs"),