Skip to content

Instantly share code, notes, and snippets.

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
  Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'

UIActivityIndicatorView

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Real World Haskell is available online. (Thanks bos!)

I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Krishna
Krishna / README.md
Created March 9, 2016 23:06 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@Krishna
Krishna / itunesicon.rb
Created October 28, 2017 17:36 — forked from ttscoff/itunesicon.rb
Retrieve a 512 x 512px icon for an iOS app
#!/usr/bin/ruby
# encoding: utf-8
#
# Updated 2017-10-25:
# - Defaults to large size (512)
# - If ImageMagick is installed:
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb)
# - replace original with rounded version, converting to png if necessary
#
# Retrieve an iOS app icon at the highest available resolution
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
`DirectoryMonitor` is used to monitor the contents of the provided directory by using a GCD dispatch source.
*/
import Foundation
@Krishna
Krishna / SafeSet.m
Created June 13, 2018 08:17 — forked from ridiculousfish/SafeSet.m
A thread safe set written in Objective-C
#import <Foundation/Foundation.h>
@interface SafeSet : NSObject {
NSMutableSet *set;
dispatch_queue_t queue;
}
@end
@implementation SafeSet
@Krishna
Krishna / cli-nsrunloop.m
Created June 13, 2018 08:20 — forked from syzdek/cli-nsrunloop.m
Creating an NSRunLoop for a command line utility.
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSRunLoop * runLoop;
CLIMain * main; // replace with desired class
@autoreleasepool
{
// create run loop
@Krishna
Krishna / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Created September 12, 2019 16:36 — forked from iscott/simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4 or 5
@Krishna
Krishna / libdispatch-efficiency-tips.md
Created March 10, 2020 18:15 — forked from tclementdev/libdispatch-efficiency-tips.md
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

I suspect most developers are using the libdispatch inefficiently due to the way it was presented to us at the time it was introduced and for many years after that, and due to the confusing documentation and API. I realized this after reading the 'concurrency' discussion on the swift-evolution mailing-list, in particular the messages from Pierre Habouzit (who is the libdispatch maintainer at Apple) are quite enlightening (and you can also find many tweets from him on the subject).

My take-aways are: