This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # Configure | |
| CURRENT_ORG=SAMPLE_ORG | |
| CURRENT_REPO=${PWD##*/} | |
| # Track, fetch and pull all branches from previous host | |
| git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |
#ios #swift #objective-c #objc #obj-c #articles #tutorials #resources #tools #blogs #apps #services #books #courses
For a beginner that’s starting from scratch, I currently recommend HackingWithSwift since it’s free and it has a structured learning path. I’ve seen some juniors start successfuly with SwiftUI first which is easier for them and then go deep with UIKit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HomeTabBar: UITabBar { | |
| // Other code here... | |
| override func draw(_ rect: CGRect) { | |
| // self.paintHitBox() | |
| self.addShape() | |
| } | |
| override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { | |
| let normalBox = super.point(inside: point, with: event) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # https://gist.github.com/lecksfrawen/fab1a1690ab7b80b4acac617cb5be403 | |
| export OTHER_CODE_SIGN_FLAGS=--options=runtime | |
| export OPENVPN_COMPILE_PATH=$HOME/openvpn_source | |
| # Uncomment this if you'd like to clean up the folders before compiling | |
| if [[ -d $OPENVPN_COMPILE_PATH ]] ; then | |
| rm -rf $OPENVPN_COMPILE_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!--- | |
| 2021-01-28 | |
| Should load youtube videos automatically on mobile for work page. | |
| Doesn't work with scripted playback, more on this here: | |
| https://developers.google.com/youtube/iframe_api_reference?hl=tr | |
| --> | |
| <script type="text/javascript"> | |
| var tag = document.createElement('script'); | |
| tag.id = 'iframe-demo'; | |
| tag.src = 'https://www.youtube.com/iframe_api'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "ViewController.h" | |
| #import <CoreImage/CoreImage.h> | |
| #import <AVFoundation/AVFoundation.h> | |
| @interface ViewController () { | |
| } | |
| @property (strong, nonatomic) CIContext *coreImageContext; | |
| @property (strong, nonatomic) AVCaptureSession *cameraSession; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to disable the iOS Simulator app from showing the "Do you want the application xxxx to accept incoming network connections?" pop-up every time the app is run | |
| echo "> Enter password to temporarily shut firewall off" | |
| sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off | |
| echo "> Add Xcode as a firewall exception" | |
| /usr/libexec/ApplicationFirewall/socketfilterfw --add /Applications/Xcode.app/Contents/MacOS/Xcode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // TVShowTableViewCell.swift | |
| // TVShows | |
| // | |
| // Created by Hector de Diego on 2/22/19. | |
| // Copyright © 2019 hector.dd. All rights reserved. | |
| // | |
| import UIKit |