Skip to content

Instantly share code, notes, and snippets.

View MacMark's full-sized avatar

Markus Möller MacMark

View GitHub Profile
@muxuezi
muxuezi / C_right_left_rule.c
Created May 26, 2014 07:48
The "right-left" rule is a completely regular rule for deciphering C declarations. It can also be useful in creating them.
/*The "right-left" rule is a completely regular rule for deciphering C
declarations. It can also be useful in creating them.
First, symbols. Read
* as "pointer to" - always on the left side
[] as "array of" - always on the right side
() as "function returning" - always on the right side
as you encounter them in the declaration.
@MrBoog
MrBoog / UITabBar+Badge.swift
Last active February 1, 2023 16:24
UITabBar+Badge
import Foundation
fileprivate let tabBarItemTag: Int = 10090
extension UITabBar {
public func addItemBadge(atIndex index: Int) {
guard let itemCount = self.items?.count, itemCount > 0 else {
return