Skip to content

Instantly share code, notes, and snippets.

View JesusMartinAlonso's full-sized avatar
👣
Bit by Bit

JesusMartinAlonso

👣
Bit by Bit
View GitHub Profile
@JesusMartinAlonso
JesusMartinAlonso / OCLint.sh
Created November 21, 2016 15:00 — forked from ManWithBear/OCLint.sh
OCLint script for xcode
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
hash oclint &> /dev/null
if [ $? -eq 1 ]; then
echo >&2 "oclint not found, analyzing stopped"
exit 1
fi
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import com.android.vending.expansion.zipfile.APKExpansionSupport;
import com.android.vending.expansion.zipfile.ZipResourceFile;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.TransferListener;
@JesusMartinAlonso
JesusMartinAlonso / iOSSimulatorUtilities.sh
Last active October 29, 2019 07:08
iOS simulator command line util commands
//Take screenshot
xcrun simctl io booted screenshot
//Record a video
xcrun simctl io booted recordVideo <filename>.<extension>
//Open link (util for deeplinking testing)
xcrun simctl openurl booted "https://www.example.com/content?id=2"
//Reset all simulator contents
xcrun simctl erase all
@JesusMartinAlonso
JesusMartinAlonso / FFMpeg.sh
Created February 6, 2019 15:33
Useful ffmpeg commands
# Convert a 9:16 video (1080x1920) into a 3:4 video (1440x1920) adding orange bands
# Documentation: https://ffmpeg.org/ffmpeg-filters.html#pad-1
ffmpeg -i splashVideo.mp4 -vf pad=width=1440:height=1920:x=180:y=0:color=orange -c:v libx264 -crf 20 -c:a copy output.mp4
@JesusMartinAlonso
JesusMartinAlonso / FadeScrollView.swift
Last active June 25, 2019 08:28 — forked from luismachado/FadeScrollView.swift
Custom UIScrollView with fade effect
//
// FadeScrollView.swift
//
// Created by Jesus Martin Alonso on 24/06/2019.
// Inspired by https://gist.github.com/luismachado/1423427b4c60021d71a8772e4dabc140
// Copyright © 2017 Luis Machado. All rights reserved.
import UIKit
/// UIScrollView subclass that fades the top/bottom edges depending of the scroll position
@JesusMartinAlonso
JesusMartinAlonso / UILabel+Utils.swift
Created July 11, 2019 12:24
Some extension functions of UILabel that helps to format the text of the label
//
// UILabel+Utils.swift
//
// Created by Jesus Martin Alonso on 21/11/2018.
//
import Foundation
import UIKit
extension UILabel {
@JesusMartinAlonso
JesusMartinAlonso / swift-ios-cheatsheet.md
Last active November 20, 2019 09:57
Swift-iOS Cheatsheet
@JesusMartinAlonso
JesusMartinAlonso / BaseViewController.swift
Created October 27, 2019 16:38
BaseViewController in swift to allows show loading in any viewcontroller
//
// BaseViewController.swift
// iOS architecture
//
// Created by Jesus Martin Alonso on 27/10/2019.
//
import UIKit
class BaseViewController: UIViewController {