Skip to content

Instantly share code, notes, and snippets.

View Wooder's full-sized avatar

Jochen Holzer Wooder

  • Karlsruhe, Germany
View GitHub Profile
@Pacek
Pacek / bundler-fix.md
Last active May 4, 2021 14:55
How to fix Ruby Bundler on Big Sur beta

THE PROBLEM

After updating to macOS Big Sur beta you might encounter issues when using Ruby Bundler to manage Ruby gems in your project - in our case to install CocoaPods and Fastlane for iOS development.

Ignoring json-2.2.0 because its extensions are not built. Try: gem pristine json --version 2.2.0

...

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

@marco79cgn
marco79cgn / dm-toilet-paper.js
Last active February 29, 2024 17:35
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
@stevemoser
stevemoser / IncompatibleAppsList.plist
Created June 20, 2019 19:38
List of 235 apps incompatible with macOS Catalina 10.15
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IncompatiblePaths</key>
<array>
<dict>
<key>Application Name</key>
<string>Sxs Memory Card Driver</string>
<key>Blurb</key>
name download_total
AFNetworking 61983241
Fabric 50998892
Crashlytics 49667729
SDWebImage 45471101
Alamofire 42097177
CocoaLumberjack 36071914
Bolts 35294870
FirebaseInstanceID 30277793
FirebaseAnalytics 30254593
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active April 16, 2024 01:02
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@simonseyer
simonseyer / WeakSet.swift
Created February 27, 2018 15:37
Typesafe implementation of a weak set in Swift 4
import Foundation
public class WeakSet<T: AnyObject>: Sequence, ExpressibleByArrayLiteral, CustomStringConvertible, CustomDebugStringConvertible {
private var objects = NSHashTable<T>.weakObjects()
public init(_ objects: [T]) {
for object in objects {
insert(object)
}
@jessesquires
jessesquires / gitsl.sh
Last active December 3, 2023 07:08
git "smartlog" / "pretty log"
# blog post
#
# https://www.jessesquires.com/blog/customizing-git-log/
git log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset'
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 24, 2024 18:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Wooder
Wooder / useful-git-commands.txt
Last active April 5, 2024 09:40
useful-git-commands collection
#H1 Useful GIT commands
#H2 Which Git Branches contain the given commit
#H3 local
git branch --contains your_commit_hash
#H3 remote
git branch -a --contains your_commit_hash
#H2 Revert a merge commit that was already pushed
git revert -m 1 <commit-hash>
@codelynx
codelynx / ZWeakObjectSet.swift
Last active October 26, 2020 01:54
A Swift class that manages weak objects
// WeakObjectSet.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2020 Electricwoods LLC, Kaz Yoshikawa.
//
// 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