Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Okay.

Carlo Zottmann czottmann

💭
Okay.
View GitHub Profile
@czottmann
czottmann / fake-scan-automator.sh
Created September 14, 2022 21:07 — forked from Pezmc/fake-scan-automator.sh
Make a pdf look scanned with macOS automator as a quick action
View fake-scan-automator.sh
#!/bin/bash
# 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
czottmann / scompler-css-guide.md
Last active January 14, 2016 12:37 — forked from bobbygrace/trello-css-guide.md
Scompler CSS Guide
View scompler-css-guide.md

Scompler CSS Guide

"I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it's pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind."

You often hear updog saying stuff like this. Who's updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it's time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it's easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean an

@czottmann
czottmann / raspberry-pi-vpn-router.md
Created November 18, 2015 12:26 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router
View raspberry-pi-vpn-router.md

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2015-09-24-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

View langoliers.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder
TWITTER_USER = "your_twitter_username"
@czottmann
czottmann / whatever-manifesto.md
Created April 24, 2012 12:52 — forked from hmans/whatever-manifesto.md
The Dick Manifesto
View whatever-manifesto.md

THE DICK MANIFESTO

  1. Don't be a dick.
View snippet.js
// ossum radio buttons!
$('label:has(input:checked)').addClass('checked');
$('.input.radio label').click(function () {
$(this).siblings('label').removeClass('checked');
$(this).addClass('checked');
});
// besser:
$("form input:radio")
View gist:600932

backup from google cache, still useful for svn repos with funny structure that git svn can't understand automatically

First, clone the SVN repo with:

git-svn clone svn+ssh://your-server/home/svn/project-name/trunk -r NNNN project-name.git

where NNNN is some relatively recent revision, unless you like waiting forever for git-svn to sync. Make sure that the revision number you pick is actually on trunk -- don't just choose an arbitrary number in the past. Don't bother trying to pull branches with the -b argument at this point -- if that worked, we