Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1b
- Decimal:
27
// Created by Thiago Holanda on 22.06.19. | |
// twitter.com/tholanda | |
import SwiftUI | |
struct ContainerView: View { | |
@State var decimal = "" | |
@State var twitter = "" | |
@State var url = "" | |
@State var search = "" |
// MARK: - String Extension | |
private extension String { | |
/** | |
replace characters from the original text to some image | |
- parameter character: the character that will be used to be replaced by image | |
- parameter image: image name that will replace the character | |
*/ | |
func replace(char character: String, image: String) -> NSAttributedString { | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
NSString *start = @"CéuÁbÊrtação"; | |
NSData *stringAsciiEncoded = [start dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; | |
NSString *simpleString = [[NSString alloc] initWithData:asciiEncoded encoding:NSASCIIStringEncoding]; | |
NSLog(@"Valor: %@", simpleString); | |
} |
# Note: You MUST have curl 7.47+ with http/2 support compiled in | |
curl -v \ | |
-d '{"aps":{"alert":"<message>","badge":42}}' \ | |
-H "apns-topic: <bundle id>" \ | |
-H "apns-priority: 10" \ | |
--http2 \ | |
--cert <certificate file> \ | |
https://api.development.push.apple.com/3/device/<device token> |
/** | |
* PreviewDevice+ListOfPads.swift | |
* Copyright (c) Thiago Holanda 2020 | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ | |
import SwiftUI |
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
import Foundation | |
class MyService: NSObject, MyServiceProtocol { | |
func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) { | |
let response = string.uppercased() | |
reply(response) | |
} | |
} |
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |