Skip to content

Instantly share code, notes, and snippets.

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

Daniel San Ferreira da Rocha danielsanfr

🏠
Working from home
View GitHub Profile
lint:
./gradlew lintCheckErrors --info
run-unit-tests:
./gradlew test
run-instrumented-tests: clear-app-data disable-animations
./gradlew connectedAndroidTest
run-all-tests: run-unit-tests build-install-app run-instrumented-tests
@diefferson
diefferson / SecurePreferences.kt
Created October 28, 2019 19:36
Secure preferences
package br.com.juno.data.repository.preferences
import android.annotation.SuppressLint
import android.content.Context
import android.content.SharedPreferences
import android.security.KeyChain
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyInfo
import android.security.keystore.KeyProperties
import android.util.Base64
@fevangelou
fevangelou / install_nano_on_macos_without_homebrew.sh
Last active February 18, 2025 16:51
Install Nano Editor (with syntax highlighting) on MacOS without using Homebrew [updated Jan 2024]
#!/bin/bash
# Install Nano Editor (with syntax highlighting) on MacOS without using Homebrew
# You can get the latest version number from https://www.nano-editor.org
# Instructions:
# - First off, download this Bash script from the browser & make it executable:
# $ chmod +x install_nano_on_macos_without_homebrew.sh
# - If you have "wget" installed (you most likely do), just run the script with:
# $ ./install_nano_on_macos_without_homebrew.sh
@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* 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
@rambabusaravanan
rambabusaravanan / .gitconfig
Last active March 4, 2025 16:34
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]