Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Gomez danielgomezrico

View GitHub Profile
@fortinmike
fortinmike / reclaim-disk-space.bat
Last active Jan 5, 2021
Aggressively reclaim disk space in a Windows partition
View reclaim-disk-space.bat
::
:: Reclaims Windows disk space in a "destructive" manner (can't uninstall service packs and updates afterwards, etc.).
:: Use at your own risk. Useful for Windows installations in space-constrained environments, such as a small Boot Camp
:: partition on a Mac.
::
:: [IMPORTANT] It is strongly suggested to make a full-disk backup of your Windows partition before running this script,
:: as you can't roll back service packs and updates afterwards.
::
:: [IMPORTANT] Run this script as admin (required to run `Dism.exe` among other things).
::
@cdmunoz
cdmunoz / cdmi_android.md
Last active Feb 12, 2020
Carlos Daniel Muñoz and Android Community
View cdmi_android.md

Community Impact: Carlos Daniel Munoz Idarraga

Summary

Impact Description Total
Direct Impact Meetups, confs and talks +1.1k
Indirect Impact Articles, Stack overflow +135k
People Trained Workshops +60
@lordcodes
lordcodes / ci-setup.sh
Created Jan 22, 2019
Android Circle CI config involving workflows, caching and sharing the workspace between steps in workflow.
View ci-setup.sh
#!/usr/bin/env bash
# Accept licenses
${ANDROID_HOME}/tools/bin/sdkmanager --licenses
# Install dependencies
./gradlew androidDependencies || true
View BaseDao.kt
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@thomasdarimont
thomasdarimont / App.java
Last active Mar 15, 2021
Secure REST API Example with Spring Security, Spring Session, Spring Boot
View App.java
package demo;
import java.io.Serializable;
import java.security.Principal;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@danielesegato
danielesegato / Maven-Publish.Android-Library.md
Last active Nov 19, 2019
Android Library Publishing Maven Artifacts via gradle
View Maven-Publish.Android-Library.md

What is this

This gitst contains a script to push Android libraries as artifacts on a maven repository using the gradle build system.

It is somewhate a fork of Chris Banes gradle push script.

This was me while trying to understand how to setup maven publishing with gradle:

confused AF

Documentation is absent or very lacking and I found no script handling javadoc properly for Android.

@danielgomezrico
danielgomezrico / clean_branches.sh
Last active Aug 31, 2020
Bash / Git - remove local and remote branches for repo cleanup
View clean_branches.sh
#!/usr/bin/env sh
#
# Remove from local and remotes the branches inside
# BRANCHES array
#
BRANCHES=(
branch_1
feature/branch_2
feature/other_thing
@mannodermaus
mannodermaus / CompatTextView.java
Last active Aug 30, 2018
Custom TextView implementation to allow VectorDrawableCompat to work with compound Drawables
View CompatTextView.java
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.AppCompatDrawableManager;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
@shau-lok
shau-lok / add local aar file.md
Last active Apr 23, 2021
Android Studio add local .aar reference
View add local aar file.md

Add local .aar file

  1. basic build.gradle directory using flatDir
repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
@danielgomezrico
danielgomezrico / AndroidManifest.xml
Last active May 22, 2018 — forked from xrigau/AndroidManifest.xml
Android - AndroidJUnitRunner that disable animations, disable screen lock and wake processor all the time to avoid Tests to fail because of test device setup. Note that my test buildType is mock to have a manifest just for tests (dont want to ship an app with SET_ANIMATION_SCALE permissions...).
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This file should be outside of release manifest (in this case app/src/mock/Manifest.xml -->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tests">
<!-- For espresso testing purposes, this is removed in live builds, but not in dev builds -->
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />