Skip to content

Instantly share code, notes, and snippets.

💭
Faça o que puder, com o que tiver, onde estiver

Filipe Bezerra filipebezerra

💭
Faça o que puder, com o que tiver, onde estiver
Block or report user

Report or block filipebezerra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joseluisq
joseluisq / stash_dropped.md
Last active Jan 16, 2020
How to recover a dropped stash in Git?
View stash_dropped.md

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

View Android Color Control Cheat Sheet
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
@gilyes
gilyes / Backup, restore postgres in docker container
Last active Jan 13, 2020
Backup/restore postgres in docker container
View Backup, restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@lopspower
lopspower / README.md
Last active Jan 15, 2020
Hexadecimal color code for transparency
View README.md

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

View flask_abort_example.py
from flask import abort, make_response, jsonify
abort(make_response(jsonify(message="Message goes here"), 400))
View Android Color Control Cheat Sheet
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
@bryanstern
bryanstern / OkHttpStack.java
Last active Dec 15, 2019
An OkHttp backed HttpStack for Volley
View OkHttpStack.java
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@rponte
rponte / StringUtils.java
Last active Oct 31, 2019
Removing accents and special characters in Java: StringUtils.java and StringUtilsTest.java
View StringUtils.java
package br.com.triadworks.rponte.util;
import java.text.Normalizer;
public class StringUtils {
/**
* Remove toda a acentuação da string substituindo por caracteres simples sem acento.
*/
public static String unaccent(String src) {
You can’t perform that action at this time.