Skip to content

Instantly share code, notes, and snippets.

View czottmann's full-sized avatar
💭
Sure.

Carlo Zottmann czottmann

💭
Sure.
View GitHub Profile
@czottmann
czottmann / filter-list.txt
Last active September 3, 2022 18:44
Example uBlock Origin filters for hiding reaction videos on youtube.com
# YT grid view
www.youtube.com##ytd-rich-item-renderer:has(yt-formatted-string[aria-label*=" REACTION "])
www.youtube.com##ytd-rich-item-renderer:has(yt-formatted-string[aria-label*=" Reaction "])
www.youtube.com##ytd-rich-item-renderer:has(yt-formatted-string[aria-label*=" REACTS "])
www.youtube.com##ytd-rich-item-renderer:has(yt-formatted-string[aria-label*=" Reacts "])
# YT list/results view
www.youtube.com##ytd-video-renderer:has(yt-formatted-string[aria-label*=" REACTION "])
www.youtube.com##ytd-video-renderer:has(yt-formatted-string[aria-label*=" Reaction "])
www.youtube.com##ytd-video-renderer:has(yt-formatted-string[aria-label*=" REACTS "])

Keybase proof

I hereby claim:

  • I am czottmann on github.
  • I am czottmann (https://keybase.io/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:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@czottmann
czottmann / Procfile
Created June 15, 2011 13:43
Example of a Foreman/Capistrano/upstart setup
worker: QUEUE=* bundle exec rake environment resque:work
scheduler: bundle exec rake environment resque:scheduler
@czottmann
czottmann / gist:2490462
Last active October 23, 2020 02:49
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.
/*jslint browser: true, devel: true, onevar: true, undef: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */
/*global jQuery: false */
"use strict";
/**
* @module jQuery
*/
/**
@czottmann
czottmann / example.js
Created April 16, 2012 13:28
Underscore.template: Super-simple/-stupid partials. It's quick and dirty yet it does what I want, so there.
// Fetch the template HTML from the DOM, hand it over to `Underscore.template`,
// assign some variables, and set up a `partial` method.
var template = $("#tmpl-main-section").html(),
compiledTemplate = _.template( template, {
models: aCollectionOfThings,
// See template examples below on usage. It's all very complex.
partial: function( partialName, variables ) {
return _.template(
$( "#tmpl-" + partialName ).html(),
@czottmann
czottmann / gist:660914
Created November 3, 2010 09:46
Tunnel IRC via external machine
ssh -NfL 6667:irc.redsrc.com:6667 user@remote.machine
# then connect to localhost:6667
@czottmann
czottmann / install.sh
Last active March 5, 2017 12:12
[WIP] Provisioning my Mac after installing a new drive & setting up Sierra
# Install Xcode command line tools
xcode-select --install
# Install & set up homebrew
ruby ./install-homebrew.rb \
&& brew doctor \
&& brew update \
&& brew cleanup \
&& brew install caskroom/cask/brew-cask \
@czottmann
czottmann / ghost-json-export-to-markdown.rb
Created January 30, 2017 18:10
Ghost export (JSON) to Markdown files (while dropping a lot of metadata)
#!/Users/carlo/.rubies/ruby-2.3.3/bin/ruby
require 'json'
require 'ostruct'
json_content = File.open('ghost.2017-01-27.json', 'r').read
nodes = JSON.parse(json_content)
posts = nodes['db'][0]['data']['posts']
figures_pattern = /<figure>\s*\!\[(.+)\]\((.+)\)\s*<figcaption>.+<\/figcaption>\s*<\/figure>/