Skip to content

Instantly share code, notes, and snippets.


Carlo Zottmann czottmann

View GitHub Profile
czottmann / Format current file with swiftformat.scpt
Last active December 30, 2022 19:04
Xcode helper: SwiftFormat the currently focussed doc w/o losing undo history
View Format current file with swiftformat.scpt
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- # This script formats the currently open and focussed Swift file
-- # using SwiftFormat. It does so *without* resetting the editor's
-- # undo history.
-- #
-- # Version 2022-12-30.01
-- #
-- # Author: Carlo Zottmann
czottmann / IRCCloud Hide people.js
Created November 26, 2010 12:17
A few quick'n'dirty IRCCloud-related bookmarklets.
View IRCCloud Hide people.js
var p = prompt( "People to hide, comma-separated" ),
sel = [],
chng = {
opacity: 0.3,
fontSize: "90%"
if ( p ) {
p = $.trim( p ).split( /\s*,\s*/ );
sel = $.map( p, function( name ) {
czottmann / gist:3402842
Created August 20, 2012 10:11
Bug report template
View gist:3402842
#### Issue description
#### Steps to reproduce the issue
czottmann /
Created September 14, 2022 21:07 — forked from Pezmc/
Make a pdf look scanned with macOS automator as a quick action
# This script takes a PDF or list of PDFs and outputs a file(s)
# named <file>_scanned.pdf that looks like it has been scanned
# Requires imagemagic and popper to be installed (brew install imagemagick poppler)
# Accepts: a list of files
# Usage: ./<scriptfilename> pdf1.pdf pdf2.pdf
# To use as a macOS automator quick action you need to:
czottmann / . ̸island ̸StoreUsingComponent1.tsx
Last active September 8, 2022 17:39
Deno + Statery example
View . ̸island ̸StoreUsingComponent1.tsx
/** @jsx h */
import { h } from "preact";
import { incrementCount, state } from "../stores/whatever_store.ts";
export default function StoreUsingComponent1() {
const { counter } = state();
return (
<button onClick={incrementCount}>
czottmann / filter-list.txt
Last active September 3, 2022 18:44
Example uBlock Origin filters for hiding reaction videos on
View filter-list.txt
# YT grid view[aria-label*=" REACTION "])[aria-label*=" Reaction "])[aria-label*=" REACTS "])[aria-label*=" Reacts "])
# YT list/results view[aria-label*=" REACTION "])[aria-label*=" Reaction "])[aria-label*=" REACTS "])

Keybase proof

I hereby claim:

  • I am czottmann on github.
  • I am czottmann ( on keybase.
  • I have a public key whose fingerprint is 6C4E E45B 6197 65C0 9412 910C 76EE B33E 1BD3 A059

To claim this, I am signing this object:

View 2012-06-05-my-example-draft-post.mmd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
czottmann / Procfile
Created June 15, 2011 13:43
Example of a Foreman/Capistrano/upstart setup
View Procfile
worker: QUEUE=* bundle exec rake environment resque:work
scheduler: bundle exec rake environment resque:scheduler
czottmann / gist:2490462
Last active October 23, 2020 02:49
The Unfollow Manifesto
View gist:2490462

The Unfollow Manifesto

At some point in the past, I've decided to follow you on Twitter or any other social network, because you appeared to be a person whose postings I might be interested in.

But recently you noticed me unfollowing you.

Now you're confused/sad/angry. Don't be. Because here are the three simple rules I adhere to.

  1. You may unfollow me at any given time, because what I post might not be your cup of tea. It's okay, no hard feelings. I won't take that as an insult. (Really.) I assume we're still cool outside said service, unless of course I wrote some horrible shit that offended you, in which case I am probably sorry.