Skip to content

Instantly share code, notes, and snippets.

Thiago Filadelfo trfiladelfo

Block or report user

Report or block trfiladelfo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
public class NonSwipeableViewPager extends ViewPager {
public NonSwipeableViewPager(Context context) {
public NonSwipeableViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
trfiladelfo /
Created Jul 6, 2019
install postman in linux mint

When it comes to API development, my weapon of choice for testing my code is Postman. I start using Postman since it's still a Chrome App. Now it encourages its user to use Postman Native app. I definitely love the idea, but all I can find is a download link without any installation document for Linux Mint.

So, here's what I did:

Download postman
$ wget -O postman.tar.gz

Extract archive
$ sudo tar -xzf postman.tar.gz -C /opt
trfiladelfo /
Last active May 29, 2019 — forked from sethbergman/
Install Docker CE on Linux Mint 19 / Ubuntu
#!/usr/bin/env bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] bionic stable"
sudo apt-get update
sudo apt-get install
View UIImage+Resize.swift
// UIImage+Resize.swift
// Created by Marcos Griselli on 6/9/17.
// Copyright © 2017 Marcos Griselli. All rights reserved.
import Foundation
import UIKit
trfiladelfo / multipart.swift
Created Mar 12, 2019 — forked from DejanEnspyra/multipart.swift
Alamofire 4 — Multipart file upload with Swift 3 (
View multipart.swift
func requestWith(endUrl: String, imageData: Data?, parameters: [String : Any], onCompletion: ((JSON?) -> Void)? = nil, onError: ((Error?) -> Void)? = nil){
let url = "" /* your API url */
let headers: HTTPHeaders = [
/* "Authorization": "your_access_token", in case you need authorization header */
"Content-type": "multipart/form-data"
Alamofire.upload(multipartFormData: { (multipartFormData) in
trfiladelfo / RecyclerViewExtension.kt
Created Mar 5, 2019 — forked from arcadefire/RecyclerViewExtension.kt
Add addOnItemClickListener easily to a RecyclerView using Kotlin
View RecyclerViewExtension.kt
import android.view.View
interface OnItemClickListener {
fun onItemClicked(position: Int, view: View)
fun RecyclerView.addOnItemClickListener(onClickListener: OnItemClickListener) {
this.addOnChildAttachStateChangeListener(object: RecyclerView.OnChildAttachStateChangeListener {
override fun onChildViewDetachedFromWindow(view: View?) {
trfiladelfo / [1] main.js
Created Nov 3, 2018 — forked from hfalucas/[1] main.js
[Vue.js] Authentication and Authorization
View [1] main.js
* Think of this "main.js" file as your application bootstrap.
import Vue from 'vue'
import Resource from 'vue-resource'
import VueRouter from 'vue-router'
import routes from './routes'
import middleware from './middleware'
trfiladelfo / MaskWatcher.kt
Created Aug 14, 2018
Apply masks in Kotlin
View MaskWatcher.kt
* Realiza a formatação instânea na caixa de texto conforme o formato pré-definido.
* Forma de uso:
* <code>
* textview_phone.let {
* it.addTextChangedListener(Tools.MaskWatcher(Tools.MaskWatcher.Format.MOBILE_PHONE))
* }
* </code>
* @param formats padrão para aplicar a máscara.
trfiladelfo /
Created Aug 10, 2018 — forked from diegoy/
Apply masks to Android's Edit text adding this TextWatcher
MIT License
Copyright (c) 2016 Diego Yasuhiko Kurisaki
/* Example:
mEmailView.addTextChangedListener(new MaskWatcher("###-##"));
import android.text.Editable;
trfiladelfo /
Created Jul 20, 2018 — forked from scotttam/
encrypt and decrypt with PBKDF2/SHA1 and AES
import javax.crypto.Cipher;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.IvParameterSpec;
public class Decrypter {
You can’t perform that action at this time.