- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://www.bluejava.com/4NS/Speed-up-your-Websites-with-a-Faster-setTimeout-using-soon | |
// This is a very fast "asynchronous" flow control - i.e. it yields the thread and executes later, | |
// but not much later. It is far faster and lighter than using setTimeout(fn,0) for yielding threads. | |
// Its also faster than other setImmediate shims, as it uses Mutation Observer and "mainlines" successive | |
// calls internally. | |
// WARNING: This does not yield to the browser UI loop, so by using this repeatedly | |
// you can starve the UI and be unresponsive to the user. | |
// Note: For an even faster version, see https://gist.github.com/bluejava/b3eb39911da03a740727 | |
var soon = (function() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public let defaultDebugLevel = DDLogLevel.Debug | |
public let defaultTag = NSString(format: "ManhattanForum") | |
class DDLogHelper { | |
class func SwiftLogMacro(async: Bool, level: DDLogLevel, flag flg: DDLogFlag, context: Int = 0, file: String = __FILE__, function: String = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = defaultTag, format: String, args: CVaListPointer) { | |
let string = NSString(format: format, arguments: args) as String | |
SwiftLogMacro(async, level: level, flag: flg, context: context, file: file, function: function, line: line, tag: tag, string: string) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var cookieParser = require('cookie-parser'); | |
var session = require('express-session'); | |
var flash = require('express-flash'); | |
var handlebars = require('express-handlebars') | |
var app = express(); | |
var sessionStore = new session.MemoryStore; | |
// View Engines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableDictionary *vibrationParameters = [[NSMutableDictionary alloc] init]; | |
vibrationParameters[@"VibePattern"] = @[@YES, @100]; | |
vibrationParameters[@"Intensity"] = @1; | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wimplicit-function-declaration" | |
AudioServicesStopSystemSound(kSystemSoundID_Vibrate); | |
AudioServicesPlaySystemSoundWithVibration(kSystemSoundID_Vibrate, nil, vibrationParameters); | |
#pragma clang diagnostic pop |
I've moved this gist to https://github.com/phynet/iOS-Schemes please check it there ;)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
from getpass import getpass | |
def prompt(prompt): | |
return input(prompt).strip() | |
fromaddr = prompt("From: ") | |
toaddrs = prompt("To: ").split() | |
subject = prompt("Subject: ") | |
print("Enter message, end with ^D (Unix) or ^Z (Windows):") |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Completely Remove Android Studio | |
Execute these commands from the terminal | |
rm -Rf /Applications/Android\ Studio.app | |
rm -Rf ~/Library/Preferences/AndroidStudio* | |
rm ~/Library/Preferences/com.google.android.studio.plist | |
rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
rm -Rf ~/Library/Logs/AndroidStudio* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# install_xcode.sh | |
# | |
# Created by Andrew McKnight on 9/24/15 | |
# | |
# takes a downloaded .dmg containing Xcode and installs it to a specified location/name, or defaults to /Applications and the DMG's filename | |
# |