Skip to content

Instantly share code, notes, and snippets.

View carlosezam's full-sized avatar

Carlos Ezam carlosezam

  • Análisis móvil - Programación
View GitHub Profile
Política de Privacidad
Última actualización: 17 Enero 2024
Esta aplicación no recoge ni almacena ningún tipo de información personal de los usuarios.
Información que no recogemos:
No recogemos nombres, direcciones de correo electrónico, números de teléfono u otra información de identificación personal.
Datos de ubicación:
@carlosezam
carlosezam / RecipeList.json
Last active August 2, 2023 16:13
RecipeList
[{
"id": 1,
"name": "Pan Francés Tiramisú",
"description": "Aprende una nueva versión de tu clásico PAN FRANCES, ahora con un toque de café y chocolate para volverlos sabor TIRAMISÚ. El secreto: Leche condensada",
"procedure": [{
"order": 1,
"name": "Mezcla la leche evaporada, 1 cucharada de cocoa, ½ cucharada de café soluble, el huevo y la esencia de vainilla, bate hasta integrar por completo."
},
{
"order": 2,
public class XmlOrJsonConverterFactory extends Converter.Factory {
final Converter.Factory xml = SimpleXmlConverterFactory.create();
final Converter.Factory gson = GsonConverterFactory.create();
@Override
public Converter<ResponseBody, ?> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
// Retrofit gives us all the annotations so we just need to check
for (Annotation annotation : annotations) {
@carlosezam
carlosezam / Git SSH.md
Last active August 30, 2025 14:29
SSH
@carlosezam
carlosezam / Jacoco.md
Last active November 26, 2021 03:27
Android code analysis

Jacoco

Gradle project level

// build.gradle.kts

buildscript {
    dependencies {
        classpath ("org.jacoco:org.jacoco.core:$jacoco_version")
    }
@carlosezam
carlosezam / DDynamicX509TrustManager.kt
Last active November 23, 2021 21:02
Dynamic X509 TrustManager
val x509TrustManager = DynamicX509TrustManager {
// get certificated
val cf = CertificateFactory.getInstance("X.509")
var ca: Certificate? = null
val certUrl = URL("https://cert.pem")
runBlocking(Dispatchers.IO){
@carlosezam
carlosezam / .gitattributes
Created October 1, 2021 15:36 — forked from Yousha/.gitattributes
.gitattributes for Android(Java/C++) developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@carlosezam
carlosezam / README.md
Created September 30, 2021 17:54 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@carlosezam
carlosezam / LiveDataValidator.kt
Created March 30, 2021 20:42
Form validation with LiveData
class LiveDataValidator<T>(private val liveData: LiveData<T>){
private val validationRules = mutableListOf< (T?) -> Boolean >()
private val errorMessages = mutableListOf< Message >()
var error = MutableLiveData<Message?>()
fun addRule(errorMsg: Message, predicate: (T?) -> Boolean ){
validationRules.add(predicate)
errorMessages.add(errorMsg)
}
@carlosezam
carlosezam / Obfuscate.java
Created January 21, 2021 22:44
Método simple para ofuscar un número
public void testObfuscate(){
String obfuscate = obfuscate("092486", 20);
String source = deobfuscate( obfuscate );
}
public static String obfuscate(String num, int _length){
Random random = new Random();
int length = _length - 4; // reserva 4 posiciones para la metadata
int l = num.length();