Skip to content

Instantly share code, notes, and snippets.

View vinhnx's full-sized avatar
🎯
focusing

Vinh Nguyen vinhnx

🎯
focusing
View GitHub Profile
@vinhnx
vinhnx / gitflow-breakdown.md
Created April 18, 2019 05:34 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@vinhnx
vinhnx / XcodeBuildSettingsReference.md
Created April 12, 2019 08:13 — forked from NSExceptional/XcodeBuildSettingsReference.md
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

@vinhnx
vinhnx / XcodeBuildSettingsReference.md
Created April 12, 2019 08:13 — forked from NSExceptional/XcodeBuildSettingsReference.md
The Xcode Build Settings Reference in a searchable document, as of Xcode 8.3.2

Build settings reference

Active Build Action (ACTION)

A string identifying the build system action being performed.

Additional SDKs (ADDITIONAL_SDKS)

The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.

Alternate Install Group (ALTERNATE_GROUP)

@vinhnx
vinhnx / CustomURLProtocol.swift
Created March 19, 2019 13:57 — forked from aerickson14/CustomURLProtocol.swift
Custom URLProtocol monitoring URLRequests over a URLSession in Swift 3
import UIKit
class CustomURLProtocol: URLProtocol {
struct Constants {
static let RequestHandledKey = "URLProtocolRequestHandled"
}
var session: URLSession?
var sessionTask: URLSessionDataTask?
@vinhnx
vinhnx / lldb-debugging.md
Created June 10, 2018 05:32 — 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.

@vinhnx
vinhnx / script.bash
Created April 20, 2018 07:37 — forked from saiday/script.bash
Add specific GoogleService-Info.plist
if [ "${CONFIGURATION}" == "Release" ]; then
cp -r "${PROJECT_DIR}/{PATH}/GoogleService-Info-release.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
echo "Production plist copied"
elif [ "${CONFIGURATION}" == "Debug" ]; then
cp -r "${PROJECT_DIR}/{PATH}/GoogleService-Info-debug.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
echo "Development plist copied"

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

@vinhnx
vinhnx / ForceLandscape.cs
Created October 17, 2017 04:35 — forked from Ethan-VisualVocal/ForceLandscape.cs
Workaround for Unity set Screen.orientation bug on iOS 10.
using UnityEngine;
using System.Collections;
// This is used to workaround https://issuetracker.unity3d.com/issues/ios-changing-the-screen-orientation-via-a-script-sometimes-results-in-corrupted-view-on-ios-10
// Bug shows screen in portrait with content rotated 90 offscreen. Caused by explicitly setting Landscape orientation on iOS 10.
//
// On iOS this just switches to LandscapeLeft, back to Portrait, and then back to LandscapeLeft, which seems to work.
// SUGGESTION: blank out the screen before executing this, since the screen jumps around as it switches back and forth.
public class ForceLandscape : MonoBehaviour
{
@vinhnx
vinhnx / xcode-todo-fixme-as-warning.sh
Last active October 16, 2017 10:05 — forked from codelahoma/xcode-todo-fixme-as-warning.sh
Highlight TODO and FIXME as warnings in Xcode 8 (add as script build phase)
TAGS="TODO:|FIXME:"
SKIPDIRS="/Pods"
find "${SRCROOT}/" -type f \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 \
| xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" \
| grep -v "$SKIPDIRS" \
| perl -p -e "s/($TAGS)/ warning: \$1/"
@vinhnx
vinhnx / HTTPStatusCodes.swift
Created September 6, 2017 08:15 — forked from brennanMKE/HTTPStatusCodes.swift
Swift Enums for HTTP Status Codes
enum HTTPStatusCodes: Int {
// 100 Informational
case Continue = 100
case SwitchingProtocols
case Processing
// 200 Success
case OK = 200
case Created
case Accepted
case NonAuthoritativeInformation