most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
# # act like GNU screen | |
unbind C-b | |
set -g prefix C-a | |
# Allow C-A a to send C-A to application | |
bind C-a send-prefix | |
# start window index of 1 | |
set -g base-index 1 |
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' | \
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
# Page TSConfig: | |
tx_gridelements.setup { | |
# ID of Element | |
1 { | |
title = Two Columns | |
config { | |
colCount = 2 | |
rowCount = 1 | |
rows { | |
1 { |
/* | |
* uart.c | |
* | |
* Asynchronous UART example tested on ATMega328P (16 MHz) | |
* | |
* Toolchain: avr-gcc (4.3.3) | |
* Editor: Eclipse Kepler (4) | |
* Usage: | |
* Perform all settings in uart.h and enable by calling initUART(void) | |
* Compile: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Foundation | |
let config = NSURLSessionConfiguration.defaultSessionConfiguration() | |
let userPasswordString = "username@gmail.com:password" | |
let userPasswordData = userPasswordString.dataUsingEncoding(NSUTF8StringEncoding) | |
let base64EncodedCredential = userPasswordData!.base64EncodedStringWithOptions(nil) | |
let authString = "Basic \(base64EncodedCredential)" | |
config.HTTPAdditionalHeaders = ["Authorization" : authString] | |
let session = NSURLSession(configuration: config) |
import Foundation | |
import ObjectiveC.runtime | |
let myString = "foobar" as NSString | |
println(myString.description) | |
let myBlock : @objc_block (AnyObject!) -> String = { (sself : AnyObject!) -> (String) in | |
"✋" | |
} |