Skip to content

Instantly share code, notes, and snippets.

View cocoaNib's full-sized avatar

Renate Wünschl cocoaNib

  • Hamburg, Germany
View GitHub Profile
@cocoaNib
cocoaNib / TerminalBasics.txt
Created April 2, 2019 10:26
Terminal Basics
Terminal Basics
Befehl beenden (Breaker)
ctrl + c
NAVIGATION / FILE SYSTEM
$ pwd outputs the name of the current working directory
$ mkdir creates a new directory in the working directory
@cocoaNib
cocoaNib / ForwardPipe.swift
Last active April 1, 2019 13:58
Operator ForwardPipe
import UIKit
// Definition
infix operator |> : ForwardPipePrecedence
precedencegroup ForwardPipePrecedence {
associativity: left
higherThan: AssignmentPrecedence
}
@cocoaNib
cocoaNib / EssentialXcodeShortcuts
Last active November 28, 2016 10:52
Essential Xcode Shortcuts
Essential Xcode Shortcuts
🇺🇸 Keyboard
⌘ B Build
⌘ R Run
⌘ U Run Test
⇧ ⌘ K Clean
⌥ ⇧ ⌘ K Clean Build Folder
⇧ ⌘ O Open quickly
@cocoaNib
cocoaNib / KeyboardSymbols
Created November 23, 2016 10:43
Essential Keyboard symbols
⌘ Command
⌥ Option (Alt, Alternative)
⌃ Control
⇧ Shift
⇪ Capslock
↩ Return
␣ Space
⇥ Tab forward
@cocoaNib
cocoaNib / copyandpaste.lingo
Created September 14, 2016 08:58
Copy and paste of text does not work in a Director 12 Projector. Workaround
Attach this behaviour to a text-member
-- ==============================================
-- Textfieldcursor
--
-- ==============================================
global gTextFieldClipBoard
@cocoaNib
cocoaNib / AppAppearance.swift
Created August 19, 2016 09:56
AppAppearance.swift
import UIKit
// MARK: Appearance
extension AppDelegate {
func styleAppAppearance() {
// Define general style
}
@cocoaNib
cocoaNib / RMWDebug.h
Created July 7, 2016 14:44
OBJ-C Debugging
// Debug
#ifdef DEBUG
# define RMW_LOG(format, ...) NSLog((@"[Line %03d] %s " format), __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__)
#else
# define RMW_LOG(...)
#endif
#define RMW_LOG_ERROR(format, ...) NSLog((@"[Line %03d] %s ERROR " format), __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__)
@cocoaNib
cocoaNib / UIColor+Hex.swift
Last active April 21, 2016 12:08
UIColor Extension - supporting long + short hex format and alpha
extension UIColor {
convenience init(hex: String, alpha: CGFloat = 1) {
let scanner = NSScanner(string: hex)
scanner.charactersToBeSkipped = NSCharacterSet(charactersInString: "#")
var hexInt: UInt32 = 0
if scanner.scanHexInt(&hexInt) {
if hex.characters.count < 6 {
let red = CGFloat((hexInt & 0xF00) >> 8) / 15.0
@cocoaNib
cocoaNib / exportOptionsAdHoc.plist
Last active April 2, 2024 01:41
Xcode build with exportOptionsPlist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
</dict>
</plist>
@cocoaNib
cocoaNib / UISegmentedControl.swift
Last active April 18, 2021 23:24
UISegmentedControl with action for tap on selected segment
// Code for ViewController
import UIKit
class UIViewController {
@IBOutlet weak var segmentedControl: SegmentedControl!
override func viewDidLoad() {
super.viewDidLoad()