Skip to content

Instantly share code, notes, and snippets.

View policante's full-sized avatar
🏠
Working from home

Rodrigo Martins policante

🏠
Working from home
View GitHub Profile
@policante
policante / Date+ext.swift
Last active January 4, 2022 19:40
5 Extensios para você usar no seu projeto (youtube.com/devpoli)
import Foundation
extension String {
func toDate(withFormat format: String = "dd/MM/yyyy") -> Date? {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = format
return dateFormatter.date(from: self)
}
}

Terms & Conditions

By downloading or using the app, these terms will automatically apply to you – you should make sure therefore that you read them carefully before using the app. You’re not allowed to copy, or modify the app, any part of the app, or our trademarks in any way. You’re not allowed to attempt to extract the source code of the app, and you also shouldn’t try to translate the app into other languages, or make derivative versions. The app itself, and all the trade marks, copyright, database rights and other intellectual property rights related to it, still belong to Devpoli.

Devpoli is committed to ensuring that the app is as useful and efficient as possible. For that reason, we reserve the right to make changes to the app or to charge for its services, at any time and for any reason. We will never charge you for the app or its services without making it very clear to you exactly what you’re paying for.

The Meus Documentos app stores and processes personal data that you have provided to us,

Privacy Policy

Devpoli built the Meus Documentos app as a Free app. This SERVICE is provided by Devpoli at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Meus Documentos unless otherwise defined in this Privacy Policy.

@policante
policante / SpannableExt.kt
Created August 28, 2020 01:33
Extensão em Kotlin para converter String em SpannableString ou Vice-Versa.
import android.content.Context
import android.graphics.Typeface
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ForegroundColorSpan
import android.text.style.StyleSpan
import android.text.style.TextAppearanceSpan
import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.core.content.ContextCompat
@policante
policante / version.gradle
Created May 3, 2019 13:13
Script para incrementar versão Android
def readVersion() {
def versionFile = new File(project.rootDir, 'version.properties')
def version = new Properties()
def stream
try {
stream = new FileInputStream(versionFile)
version.load(stream)
} catch (FileNotFoundException ignore) {
//
} finally {
@policante
policante / BaseNavigationController.swift
Created February 20, 2019 20:40
UINavigationController swipe back like Facebook, Instagram
class BaseNavigationController: UINavigationController, UINavigationControllerDelegate {
var interactivePopTransition: UIPercentDrivenInteractiveTransition!
override func viewDidLoad() {
self.delegate = self
}
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
addPanGesture(viewController)
@policante
policante / LineDrawerView.swift
Created February 20, 2019 20:37
Classe para desenhar linha animada entre 2 pontos
class LineDrawerView: UIView {
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
}
public class ViewBox extends LinearLayout {
private float radiusCorner = 0f;
private int backgroundRes = -1;
private int paddingBox = 0;
public ViewBox(Context context) {
super(context);
init(null);
}
//
// String+extensions.swift
//
// Created by Rodrigo Martins on 01/09/17.
// Copyright © 2017 Tinker Tecnologia. All rights reserved.
//
import Foundation
extension String {
//
// UIColor+extension.swift
//
// Created by Rodrigo Martins on 03/07/17.
// Copyright © 2017 Rodrigo Martins. All rights reserved.
//
import UIKit
extension UIColor {