Skip to content

Instantly share code, notes, and snippets.

View faizmokh's full-sized avatar
🏠
Working from home

Faiz Mokhtar faizmokh

🏠
Working from home
View GitHub Profile
@faizmokh
faizmokh / FontCacheDescriptor+Graphik.swift
Created July 9, 2018 03:04 — forked from shaps80/FontCacheDescriptor+Graphik.swift
Better font loading in iOS with Swift
extension UIFont {
// The `rawValue` MUST match the filename (without extension)
public enum Graphik: String, FontCacheDescriptor {
case regular = "GraphikAltWeb-Regular"
case medium = "GraphikAltWeb-Medium"
case regularItalic = "GraphikAltWeb-RegularItalic"
case mediumItalic = "GraphikAltWeb-MediumItalic"
}
@faizmokh
faizmokh / lldb-debugging.md
Created June 12, 2018 04:48 — forked from alanzeino/lldb-debugging.md
LLDB debugging with examples

LLDB Debugging Cheat Sheet

Commands

LLDB Commands

LLDB comes with a great set of commands for powerful debugging.

help

Your starting point for anything. Type help to get a list of all commands, plus any user installed ones. Type 'help for more information on a command. Type help to get help for a specific option in a command too.

@faizmokh
faizmokh / type-safe-id.swift
Last active May 17, 2018 02:57
Swift Type-safe Identifier
//: Article: https://www.swiftbysundell.com/posts/type-safe-identifiers-in-swift
import UIKit
struct Identifier<Value>: Hashable {
let string: String
}
extension Identifier: ExpressibleByStringLiteral {
init(stringLiteral value: String) {
@faizmokh
faizmokh / Breakpoints_v2.xcbkptlist
Created March 15, 2018 15:06 — forked from Ashton-W/Breakpoints_v2.xcbkptlist
My User Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<!-- All Exceptions -->
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
@faizmokh
faizmokh / README.md
Created March 9, 2018 02:38 — forked from guilhermearaujo/README.md
OCLint integration with Xcode

OCLint integration with Xcode

1. Integration

  • Add a new Target of kind Aggregate, name it OCLint
  • Under Builde Phases, add a new Run Script Phase
  • Paste the script

2. Usage

  • Select target OCLint
  • Build the target (press ⌘+B)
@faizmokh
faizmokh / multiple_ssh_setting.md
Created February 5, 2018 05:53 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@faizmokh
faizmokh / introrx.md
Created February 2, 2018 06:58 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@faizmokh
faizmokh / namespacing.swift
Last active January 23, 2018 02:57
Namespacing example
struct API {
// to prevent it from being instantiated
private init() {}
static let baseURL: String = "htttps://faizmokhtar.com"
static let token: String = "asdasdasskdhsdjkadh"
}
if let url = URL(string: API.baseURL) {
//: ## Toggle extension
import Foundation
// Toggle extension
extension Bool {
mutating func toggle() {
self = !self
}