Skip to content

Instantly share code, notes, and snippets.

View renanfranca's full-sized avatar
😄

Renan Franca renanfranca

😄
View GitHub Profile
@corneil
corneil / sdk-java.sh
Last active January 31, 2024 18:40
Easily select java version and distribution with sdkman
#!/bin/bash
function sdkj() {
if [ "$1" == "" ]; then
echo "Expected Version prefix"
exit 1
fi
PREFIX=$1
CONTAINS=$2
# list candidates in the order they were installed. Last matching installed will be selected.
CANDIDATES=$(ls -tr ~/.sdkman/candidates/java/)
@natescode
natescode / .gitconfig
Last active March 1, 2024 02:00
Git Aliases to make GIT easier to work with
[user]
email = your_email
name = your_username
[alias]
# view your global git config Aliases from CLI
aliases = config --get-regexp '^alias\\.'
# git clone
cl = !git clone
# Git shallow clone for large repos
clq= !git clone --depth=1
//Define the gateway application
application {
config {
baseName gateway,
applicationType gateway,
packageName com.mamazinha.gateway,
authenticationType jwt,
prodDatabaseType postgresql,
clientFramework angularX,
serviceDiscoveryType eureka,
@renanfranca
renanfranca / latest-blog-post-profile-workflow-every-hour.yml
Last active March 29, 2022 22:17
Automatically show yours latest blog post at your github profile
name: Latest blog post workflow every hour
on:
schedule:
- cron: '0 * * * *'
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@renanfranca
renanfranca / latest-blog-post-profile-workflow-manual.yml
Last active March 29, 2022 22:17
Automatically show yours latest blog post at your github profile
name: Latest blog post profile workflow manual
on:
workflow_dispatch:
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/blog-post-workflow@master
@luisfelipeas5
luisfelipeas5 / SonarQubeREADME.md
Last active February 6, 2024 12:27
Um guia para configurar o básico do SonarQube + Jacoco

Adicione o plugin do SonarQube

Primeiro, adicione ao build.gradle de nível de projeto:

buildscript {
   repositories {
       //...
       maven {
           url "https://plugins.gradle.org/m2/"
       }
@chranderson
chranderson / nvmCommands.js
Last active May 25, 2024 08:46
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
/*
* Copyright (C) 2014 Chris Banes
*
* 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
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@danielesegato
danielesegato / AndroidBug-OptionItems-Fragments-29472-workaround.md
Last active March 27, 2019 13:40
Android Option Menu + Fragments Workaround with ViewPager / ActionBar / Drawer, Menu Items not displaying

This gist is a workaround to this bug:

https://code.google.com/p/android/issues/detail?id=29472

No changes are needed to your current code but changing the extended fragment/activity class.

All you have to do is put this two classes in your code and make your activity extend MenuManagerActivity and your fragment MenuDelegatorFragment. If you are using Nested fragment you must make sure that all fragments containing nested Fragments with options menu also extend MenuDelegatorFragment (both if the parent fragment need an option menu both if it doesn't need it).