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 / 3-Fastfile
Created January 8, 2018 04:00
3-Fastfile
fastlane_version "2.66.2"
default_platform :ios
xcversion(version: "9.2")
platform :ios do
before_all do
ensure_git_status_clean
version_number = get_version_number(xcodeproj: "ToyFastlaneAppIcon.xcodeproj")
build_number = number_of_commits(all: true)
platform :ios do
before_all do
version_number = get_version_number(xcodeproj: "ToyFastlaneAppIcon.xcodeproj")
build_number = number_of_commits(all: true)
increment_build_number(build_number: build_number)
end
desc "Create a new Alpha build"
lane :alpha do
end
apple_id ENV["FAIZ_APPLE_ID"] # Your Apple email address
team_id ENV["FAIZ_TEAM_ID"] # Developer Portal Team ID
for_platform :ios do
for_lane :alpha do
app_identifier "com.faizmokhtar.toyfastlaneappicon.alpha"
end
for_lane :beta do
app_identifier "com.faizmokhtar.toyfastlaneappicon.beta"
gem 'fastlane-plugin-badge'
apple_id ENV["FAIZ_APPLE_ID"] # Your Apple email address
team_id ENV["FAIZ_TEAM_ID"] # Developer Portal Team ID
for_platform :ios do
for_lane :alpha do
app_identifier "com.faizmokhtar.toyfastlaneappicon.alpha"
end
for_lane :beta do
app_identifier "com.faizmokhtar.toyfastlaneappicon.beta"
fastlane_version "2.66.2"
default_platform :ios
xcversion(version: "9.2")
platform :ios do
before_all do
ensure_git_status_clean
version_number = get_version_number(xcodeproj: "ToyFastlaneAppIcon.xcodeproj")
build_number = number_of_commits(all: true)
@faizmokh
faizmokh / ToyRetainCycle.swift
Created January 4, 2018 09:20
Swift unowned vs weak
class ToyWeakClass {
var closure: (() -> ())?
var name = "Toy Weak"
init() {
self.closure = { [weak self] in
print("This is a \(self?.name) closure")
}
}

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@faizmokh
faizmokh / lldb_cheat_sheet.md
Created December 9, 2017 15:15 — forked from ryanchang/lldb_cheat_sheet.md
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type
@faizmokh
faizmokh / postgres cheatsheet.md
Created October 20, 2017 13:10 — forked from apolloclark/postgres cheatsheet.md
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL