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 |
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
class CustomTextField: UITextField { | |
weak var presenter: UIViewController! | |
override func becomeFirstResponder() -> Bool { |
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
class CustomTextField: UITextField { | |
weak var presenter: UIViewController! | |
override func becomeFirstResponder() -> Bool { |
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 | |
install_cocoapods () { | |
echo "Installing cocoapods with gem" | |
# Creating new gems home if it doesnt't exist | |
if [ ! -d "$HOME/.gem" ]; then | |
mkdir "$HOME/.gem" | |
fi | |
# Adding to current session |