Skip to content

Instantly share code, notes, and snippets.

View gfreivasc's full-sized avatar

Gabriel Freitas Vasconcelos gfreivasc

View GitHub Profile
@gfreivasc
gfreivasc / BackgroundService.java
Last active July 7, 2022 06:05
A BackgroundService class for Android
package com.gabrielfv.android.engine;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 25, 2025 04:38
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@turicas
turicas / converte_datetime_pt.py
Last active September 26, 2024 17:00
Converts a Portuguese datetime in Python datetime format
# coding: utf-8
import datetime
MONTHS = {'jan': 1, 'fev': 2, 'mar': 3, 'abr': 4, 'mai': 5, 'jun': 6,
'jul': 7, 'ago': 8, 'set': 9, 'out': 10, 'nov': 11, 'dez': 12}
FULL_MONTHS = {'janeiro': 1, 'fevereiro': 2, u'março': 3, 'abril': 4,
'maio': 5, 'junho': 6, 'julho': 7, 'agosto': 8,
'setembro': 9, 'outubro': 10, 'novembro': 11, 'dezembro': 12}