Skip to content

Instantly share code, notes, and snippets.

View flowinho's full-sized avatar
🤷‍♂️
Analog life is way more complicate than digital

Florian Schuttkowski flowinho

🤷‍♂️
Analog life is way more complicate than digital
View GitHub Profile
{"subject":"acct:audiodump@podcasts.social","aliases":["https://podcasts.social/@audiodump","https://podcasts.social/users/audiodump"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://podcasts.social/@audiodump"},{"rel":"self","type":"application/activity+json","href":"https://podcasts.social/users/audiodump"},{"rel":"http://ostatus.org/schema/1.0/subscribe","template":"https://podcasts.social/authorize_interaction?uri={uri}"}]}
@flowinho
flowinho / p7zip_compression_alias.sh
Last active February 28, 2022 14:30
Useful 7zip aliases
alias 75='7z a -r -t7z -m0=lzma2 -mx=9 -myx=9 -mqs=on -ms=on'
alias 74='7z a -r -t7z -m0=lzma2 -mx=9'
alias 73='7z a -r -t7z -m0=lzma2 -mx=7'
alias 72='7z a -r -t7z -m0=lzma2 -mx=5'
alias 71= '7z a -r -t7z -m0=lzma2 -mx=3'
alias 70='7z a -r -t7z -m0=lzma2 -mx=1'
@flowinho
flowinho / pdf-to-pdfa.md
Last active May 19, 2021 14:00
Convert all pdf in a directory to PDF/A using LibreOffice

The headless version of libreoffice uses the PDF settings you define using File -> Export as PDF (not directly export) Adjust the settings you need there, PDF/A 1b is sufficient for most cases.

Basic headless command

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless

Tell libreoffice to convert to PDF

@flowinho
flowinho / LocationManager.swift
Created January 18, 2019 07:41
Protocol based LocationManager to use in Composition projects
// MIT License
//
// Copyright (c) 2018 Florian Schuttkowski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@flowinho
flowinho / hide-quantum-tab-bar.sh
Created July 30, 2018 11:52 — forked from automaticit/hide-quantum-tab-bar.sh
Hide Firefox Quantum tab bar
#!/bin/bash
#
# Based upon [[https://superuser.com/questions/1268732/how-to-hide-tab-bar-tabstrip-in-firefox-57-quantum/1268734#1268734][How to hide tab bar (tabstrip) in Firefox 57+ Quantum]] by [[https://superuser.com/users/162466/vasyanovikov][VasyaNovikov]]
# This causes the [[https://support.mozilla.org/en-US/questions/1187186][The Back Button is top right under the Red close button on my Mac]] issue.
# Resolve that by right-clicking the toolbar, then inserting three Flexible Space into the toolbar on the far-left-hand side.
case $( uname ) in
"Linux")
profile_dir=~/.mozilla/firefox/$( ls -tr ~/.mozilla/firefox/ | grep -v profiles.ini | tail -1 )
;;
"Darwin")
@flowinho
flowinho / CameraPrivacyManager.swift
Created July 24, 2018 07:14
Esay access to camera privacy manager
import Foundation
import AVFoundation
public protocol CameraAccessible {}
public extension CameraAccessible {
public var camera: CameraPrivacyManager {
return CameraPrivacyManager.shared
@flowinho
flowinho / MicrophonePrivacyManager.swift
Created July 24, 2018 05:37
Easy access to the microphone using a protocol
import Foundation
import AVFoundation
public protocol MicrophoneAccessible {}
public extension MicrophoneAccessible {
public var microphone: MicrophonePrivacyManager {
return MicrophonePrivacyManager.shared
}
@flowinho
flowinho / ConvenienceLogger.swift
Created February 28, 2018 09:20
A convenient way of logging console outputs
struct Log {
static let loglevel = "LOG_LEVEL_DEBUG"
static let maxAmountOfCharacters = 25
static func print(text:String, file: String = #file, line: Int = #line){
if loglevel == "LOG_LEVEL_DEBUG" {
var f = (file as NSString).lastPathComponent
f = (f as NSString).deletingPathExtension

Keybase proof

I hereby claim:

  • I am flowinho on github.
  • I am flowinho (https://keybase.io/flowinho) on keybase.
  • I have a public key ASAh37kM1YkK7kWBbAGTfg5r5OM2NANouOkBBCf9s1c9jQo

To claim this, I am signing this object:

@flowinho
flowinho / prima.js
Last active June 14, 2017 14:08
progressive image javascript
// When loading the site...
window.onload = function() {
// Find the elements that are marked as placeholder and img-small and store their reference
var placeholder = document.querySelector('.placeholder'),
small = placeholder.querySelector('.img-small')
var img = new Image();
img.src = small.src;
img.onload = function () {