Skip to content

Instantly share code, notes, and snippets.


Hector De Diego lecksfrawen

View GitHub Profile
lecksfrawen /
Last active Mar 16, 2022
Migrate self hosted repo with files bigger than 100 MB to github via git lfs
# Configure
# 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
lecksfrawen / iOS, Swift, Objective-C
Last active May 9, 2022
iOS, Swift, Objective-C resources
View iOS, Swift, Objective-C

iOS, Swift, Objective-C resources

#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.

View CustomTabBar.swift
class HomeTabBar: UITabBar {
// Other code here...
override func draw(_ rect: CGRect) {
// self.paintHitBox()
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
let normalBox = super.point(inside: point, with: event)
lecksfrawen /
Last active Jun 28, 2021
macos catalina, compile openvpn 2.5.2 staticly
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
lecksfrawen / failed_youtube_mobile_autoplay_test.html
Last active Jan 29, 2021
Failed to make youtube embed player for mobile Safari in iOS to autoplay. It doesn't work. Posted here to save others some time...
View failed_youtube_mobile_autoplay_test.html
Should load youtube videos automatically on mobile for work page.
Doesn't work with scripted playback, more on this here:
<script type="text/javascript">
var tag = document.createElement('script'); = 'iframe-demo';
tag.src = '';
View camera-with-effects.m
#import "ViewController.h"
#import <CoreImage/CoreImage.h>
#import <AVFoundation/AVFoundation.h>
@interface ViewController () {
@property (strong, nonatomic) CIContext *coreImageContext;
@property (strong, nonatomic) AVCaptureSession *cameraSession;
View Disable iOS Simulator Incoming Connections
# 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/
lecksfrawen / TVShowTableViewCell.swift
Last active Feb 19, 2020
TableView example with canceled data task
View TVShowTableViewCell.swift
// TVShowTableViewCell.swift
// TVShows
// Created by Hector de Diego on 2/22/19.
// Copyright © 2019 hector.dd. All rights reserved.
import UIKit