Skip to content

Instantly share code, notes, and snippets.


Thiago Filadelfo trfiladelfo

View GitHub Profile
trfiladelfo /
Created Jun 3, 2021 — forked from superstrong/
Google Script to generate a UUID in Google Sheets
function getId() {
* Imported from
* Robbie Mitchell, @superstrong
* UUID.core.js: The minimal subset of the RFC-compliant UUID generator UUID.js.
* @fileOverview
trfiladelfo / index.html
Created Jul 30, 2020
Microsoft Homepage Clone
View index.html
<div class="menu-btn">
<i class="fas fa-bars fa-2x"></i>
<div class="container">
<!-- Nav -->
<nav class="main-nav">
<img src="" alt="Microsoft" class="logo">
<ul class="main-menu">
trfiladelfo / dependencies.txt
Created Jul 6, 2020
utilizando datas e timezone em javascript
View dependencies.txt
trfiladelfo /
Created May 5, 2020
interval in two dates
from datetime import timedelta, date
def daterange(date1, date2):
for n in range(int ((date2 - date1).days)+1):
yield date1 + timedelta(n)
start_dt = date(2015, 12, 20)
end_dt = date(2016, 1, 11)
for dt in daterange(start_dt, end_dt):
trfiladelfo /
Created Apr 29, 2020 — forked from fatiherikli/
Very simple MongoDB Model in Python
from pymongo import Connection
from bson import ObjectId
from itertools import imap
class Model(dict):
A simple model that wraps mongodb document
__getattr__ = dict.get
trfiladelfo /
Created Apr 26, 2020 — forked from franklinbaldo/
Google apps script to export to individual csv files all sheets in an open spreadsheet
function myFunction() {
var ss = SpreadsheetApp.getActive();
var sheet = ss.getSheetByName("orange");
var range = sheet.getRange("1:1").getValues();
var titles = range[0];
var a1range = "A1:A";
var a1array = [];
a1range = a1range +titles.length*titles.length;
var b1range = "B1:B";
trfiladelfo /
Created Apr 26, 2020 — forked from dommmel/
Google Apps Script to upload and import a CSV File into a Google Spreadsheet
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Upload CSV file", functionName: "doGet"}];
ss.addMenu("CSV", csvMenuEntries);
function doGet(e) {
var app = UiApp.createApplication().setTitle("Upload CSV to Sheet");
trfiladelfo / upload.ipynb
Created Apr 25, 2020
upload file in jupyter notebook
View upload.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
trfiladelfo / convert.kt
Last active Apr 16, 2020
Exemplo de conversão de JSON para classe
View convert.kt
import org.json.JSONObject
import org.json.JSONArray
class Task(val title:String, val email:String, val description:String) {
fun convertToJSON(): JSONObject {
val json = JSONObject()
json.put("title", title)
json.put("email", email)
json.put("description", description)
return json
View Android DeviceUtils.kt
* immersiveMode
* set onPostResume, onSystemUiVisibilityChange
fun immersiveMode(activity: Activity) {
.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)