Skip to content

Instantly share code, notes, and snippets.


Andrew Podkovyrin podkovyrin

View GitHub Profile
k06a /
Last active May 14, 2021
Git remove some dirs
# Fetch
git clone reponame
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done
# Analyze
curl > && sudo python && rm
sudo pip install git-fat
git fat -a find 1000000
git ls-tree -r -t -l --full-name HEAD | sort -n -k 4
plumhead / StringSize.swift
Created Sep 15, 2015
String extension to find the layout size of a String with specified attributes.
View StringSize.swift
extension String {
func size(withAttributes attrs: [String:AnyObject], constrainedTo box: NSSize) -> NSRect {
let storage = NSTextStorage(string: self)
let container = NSTextContainer(containerSize: NSSize(width: box.width, height: box.height))
let layout = NSLayoutManager()
storage.addAttributes(attrs, range: NSMakeRange(0, storage.length))
container.lineFragmentPadding = 0.0
let _ = layout.glyphRangeForTextContainer(container)
sakrist /
Last active Jan 18, 2022
GMP and MPFR compile for iOS
# Filename:
# Created by Volodymyr Boichentsov on 18/09/2015.
# Copyright © 2015 3D4Medical. All rights reserved.
# Property of 3D4Medical.
#-emit-obj -fembed-bitcode -disable-llvm-optzns -O3
mackuba /
Last active Dec 28, 2020
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them:

OS X El Capitan

  • split view - two apps side by side on full screen
steipete / PSPDFModernizer.c
Last active Mar 9, 2017
Retrofitting containsString: on iOS 7
View PSPDFModernizer.c
#import <Foundation/Foundation.h>
@interface NSString (PSPDFModernizer)
// Added in iOS 8, retrofitted for iOS 7
- (BOOL)containsString:(NSString *)aString;
matej / CALayer+MBAnimationPersistence.h
Last active Jan 15, 2021
Persists (pauses) layer animations (including UIView animation generated animations) when the application enters into background and restores (resumes) animations from where they left off upon returning from background.
View CALayer+MBAnimationPersistence.h
// CALayer+MBAnimationPersistence.h
// Created by Matej Bukovinski on 19. 03. 14.
// Copyright (c) 2014 Matej Bukovinski. All rights reserved.
#import <QuartzCore/QuartzCore.h>