Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
Enter Mac mode: | |
Hold =, press m. | |
The top four thumb keys while in Mac mode, from left to right are: Command | Option | Ctrl | Command | |
Enable Media keys: | |
Hold =, press n. If you have applied the remappings below, note that it is the *remapped* = (i.e. tab). | |
Disable key clicks: | |
Hold Progrm, press -/_ (disable beeps). | |
Hold Progrm, press |/\ (disable clicks). |
// | |
// SpinlockTestTests.swift | |
// SpinlockTestTests | |
// | |
// Created by Peter Steinberger on 04/10/2016. | |
// Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
// | |
import XCTest |
#!/usr/bin/env bash | |
[[ $- == *i* ]] && echo "This Bash Shell is Interactive Shell" || echo "This Bash Shell is Not a Interactive Shell" | |
shopt -q login_shell && echo "This Bash Shell is a Login Shell" || echo "This Bash Shell is Not a Login Shell" |
// Usage | |
let argv = CStringArray(["ls", "/"]) | |
posix_spawnp(nil, argv.pointers[0], nil, nil, argv.pointers, nil) | |
// Is this really the best way to extend the lifetime of C-style strings? The lifetime | |
// of those passed to the String.withCString closure are only guaranteed valid during | |
// that call. Tried cheating this by returning the same C string from the closure but it | |
// gets dealloc'd almost immediately after the closure returns. This isn't terrible when | |
// dealing with a small number of constant C strings since you can nest closures. But |
// | |
// GHReadWriteQueue.h | |
// GitHub | |
// | |
// Created by Justin Spahr-Summers on 2014-03-24. | |
// Copyright (c) 2014 GitHub. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
@end |
static BOOL PSPDFIsDevelopmentBuild(void) { | |
#if TARGET_IPHONE_SIMULATOR | |
return YES; | |
#else | |
static BOOL isDevelopment = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// There is no provisioning profile in AppStore Apps. | |
NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]]; | |
if (data) { |
import lldb | |
import re | |
import shlex | |
# This script allows Xcode to selectively ignore Obj-C exceptions | |
# based on any selector on the NSException instance | |
def getRegister(target): | |
if target.triple.startswith('x86_64'): | |
return "rdi" |