Skip to content

Instantly share code, notes, and snippets.

View filipebezerra's full-sized avatar
💭
Ich bin Filipe. Ich komme aus Brasilien. Ich wohne in Goiânia.

Filipe Bezerra filipebezerra

💭
Ich bin Filipe. Ich komme aus Brasilien. Ich wohne in Goiânia.
View GitHub Profile
@filipebezerra
filipebezerra / add_python_to_WINDOWS_WSL_ubuntu.md
Last active August 28, 2020 20:35 — forked from monkut/add_python_to_WINDOWS_WSL_ubuntu.md
Add python to Windows Subsystem for Linux (WSL) [ubuntu]
@monkut
monkut / add_python_to_WINDOWS_WSL_ubuntu.md
Created February 13, 2019 13:19
Add python to Windows Subsystem for Linux (WSL) [ubuntu]
@borgstrom
borgstrom / human_time_duration.py
Created May 9, 2018 04:00
Python: Convert seconds (duration) to human readable string
TIME_DURATION_UNITS = (
('week', 60*60*24*7),
('day', 60*60*24),
('hour', 60*60),
('min', 60),
('sec', 1)
)
def human_time_duration(seconds):
@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

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.

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 March 23, 2024 09:30
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 April 19, 2024 13:59
Hexadecimal color code for transparency

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

@hirobert
hirobert / flask_abort_example.py
Created January 13, 2016 20:38
flask abort as json
from flask import abort, make_response, jsonify
abort(make_response(jsonify(message="Message goes here"), 400))
# Defines all Languages known to GitHub.
#
# type - Either data, programming, markup, prose, or nil
# aliases - An Array of additional aliases (implicitly
# includes name.downcase)
# ace_mode - A String name of the Ace Mode used for highlighting whenever
# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg.
# Use "text" if a mode does not exist.
# wrap - Boolean wrap to enable line wrapping (default: false)
# extensions - An Array of associated extensions (the first one is
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:
-----------