Skip to content

Instantly share code, notes, and snippets.

View silmood's full-sized avatar

Petter Hdz silmood

  • GDG Androidtitlan
  • Mexico City
View GitHub Profile
@silmood
silmood / characters.json
Created April 18, 2018 01:33
App of thrones response
[
{
"id": "5872fe0f-34cc-4cd7-aa61-3bc534916a29",
"name": "Jon Snow",
"born": "283 AC",
"title": "Lord Comandante de la Guardia Nocturna",
"actor": "Kit Harington",
"quote": "Sometimes there Is no happy choice, only one less grievous than the others.",
"father": "Ned Stark",
"mother": "",
public class Cipher {
public String rot13(String text) {
char[] chars = text.toCharArray();
StringBuilder result = new StringBuilder();
for (char c : chars) {
if (c >= 'a' && c <= 'm') c += 13;
else if (c >= 'A' && c <= 'M') c += 13;
else if (c >= 'n' && c <= 'z') c -= 13;
@silmood
silmood / gist:34790b4455a8c160a121a8acb93c341f
Last active April 1, 2017 08:44
Anniversary Speakers json
"{ \"name\":\"Mishel Vera\", \"job\":\"Software Engineer en Segundamano\" } }, { \"date\":\"10:20 \n-\n 11:00\", \"title\":\"Codelab: ¡Android es para todos!\", \"speaker\": { \"name\":\"Diego Ramírez\", \"job\":\"Mobile Engineer en Segundamano\" } }, { \"date\":\"11:00 \n-\n 11:40\", \"title\":\"Clean Architecture\", \"speaker\": { \"name\":\"Salvador Maurilio\", \"job\":\"Mobile Engineer en Inventive\" } }, { \"date\":\"11:00 \n-\n 11:40\", \"title\":\"Codelab: Mi primera app en Kotlin\", \"speaker\": { \"name\":\"Pedro Hernández\", \"job\":\"Software Engineer en Bunsan\" } }, { \"date\":\"11:40 \n-\n 12:20\", \"title\":\"Bítacora del capitán android\", \"speaker\": { \"name\":\"Noe Branagan\", \"job\":\"Mobile Engineer en Instacarrot\" } }, { \"date\":\"11:40 \n-\n 12:20\", \"title\":\"Codelab: Introducción a Xamarin\", \"speaker\": { \"name\":\"Humberto Jaimes\", \"job\":\"Microsoft - Xamarin MVP\" } }, { \"date\":\"12:20 \n-\n 13:00\", \"title\":\"Android Good Practices\", \"speaker\": { \"name\":\"Anahí
@silmood
silmood / BaseActivity.kt
Last active June 25, 2016 22:06
Kotlin common classes for android
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.Toolbar
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
@silmood
silmood / dependencies.gradle
Created June 19, 2016 01:10
Gradle file that contains many base dependencies
ext {
//Packages
supportPackage = 'com.android.support'
retrofitPackage = 'com.squareup.retrofit2'
jakeWhartonPackage = 'com.jakewharton'
glidePackage = 'com.github.bumptech.glide'
hdodenhofPackage = 'de.hdodenhof'
reactivePackage = 'io.reactivex'
eventBusPackage = 'de.greenrobot'
@silmood
silmood / vector_android.xml
Created February 9, 2016 18:58
Vektr gists
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="212dp"
android:height="212dp"
android:viewportHeight="500"
android:viewportWidth="500">
<group android:name="android">
<path
android:name="head"
@silmood
silmood / proguard-rules.pro
Created July 10, 2015 20:53
The-FM proguard rules
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/Silmood/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@silmood
silmood / gradle.properties
Created July 10, 2015 20:51
The-FM gradle.properties
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
@silmood
silmood / build.gradle
Created July 10, 2015 20:50
The-FM build.gradle
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
def LAST_FM_API_KEY ='"' + LastFMApiKey + '"' ?: '"Define LastFm Api key"';
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
@silmood
silmood / Character.java
Last active August 29, 2015 14:20
Marvel RecyclerView
public class Character {
int id;
String name;
String description;
Uri urlImage;
int availableComics;
int availableSeries;
int availableStories;