Skip to content

Instantly share code, notes, and snippets.

View adriantofan's full-sized avatar

Adrian Tofan adriantofan

View GitHub Profile
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 7, 2024 09:05
Swift Concurrency Manifesto
@UnderscoreDavidSmith
UnderscoreDavidSmith / gist:8605471
Last active January 4, 2016 09:59
Rough Compilation Speed Comparison
To get a general sense of how fast a machine is for Xcode compilation I use Adium.
It is large and complex enough to tax most machines at least a bit.
My Mid 2012 2.7GHz i7 Retina Mac Book Pro does it in around 1m42s (user + sys) [real ~ 27s].
My Late 2014 4.0GHz i7 Retina iMac does it in around 1m11s (user + sys) [real ~ 18.165s].
-------------------------------
wget https://adiumx.cachefly.net/adium-1.5.9.tgz
@mattt
mattt / uiappearance-selector.md
Last active March 19, 2024 12:52
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@osteslag
osteslag / version.sh
Created July 18, 2011 12:45
Script for managing build and version numbers using git and agvtool. See link in comments below.
#!/bin/sh
# Script for managing build and version numbers using git and agvtool.
# Change log:
# v1.0 18-Jul-11 First public release.
# v1.1 29-Sep-12 Launch git, agvtool via xcrun.
version() {
@jcsrb
jcsrb / gist:1081548
Created July 13, 2011 23:05
get avatar from google profiles, facebook, gravatar, twitter, tumblr
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version