Skip to content

Instantly share code, notes, and snippets.

View andrelramos's full-sized avatar
🎯
Focusing

AndrΓ© Ramos andrelramos

🎯
Focusing
View GitHub Profile
@andrelramos
andrelramos / tldv.py
Created October 10, 2024 18:57 — forked from akash-gajjar/tldv.py
Download videos from TLDV.io
from datetime import datetime
from os import system
import requests
import json
## Please install ffmpeg before running this script and make sure it's in your PATH
## brew install ffmpeg
## Please install requests before running this script
## pip3 install requests
@andrelramos
andrelramos / app.py
Created February 12, 2024 17:14 — forked from thomasdarimont/app.py
Simple python example using flask, flask_oidc and keycloak
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@andrelramos
andrelramos / gradle
Created August 22, 2018 14:41
gradle
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMddHHmmss')
return formattedDate
}
//
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
//
//
@andrelramos
andrelramos / myenvs
Created May 15, 2018 12:43 — forked from sibelius/myenvs
Myenvs
function myenvs() {
if [[ $# -ne 1 ]]; then
export $(cat .env | xargs)
else
export $(cat $1 | xargs)
fi
}
@andrelramos
andrelramos / sanic_comeu_bola.txt
Created April 27, 2018 19:36
Do you know comeu bola?
python3 -c "print(' β–„β–„β–„β–„β–„ \n β–€β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„ ___________________________ \n β–„β–„β–„β–„β–„ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ / \ \n β–€β–€β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ ▀▐▄ β–€β–β–ˆ | Do you know comeu bola? | \n β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆ | _____________________________/ \n β–€β–„β–„β–„β–„β–„ β–€β–€β–ˆβ–„β–€β–ˆβ•β•β•β•β–ˆβ–€ |/ \n β–€β–€β–€β–„ β–€β–€β–ˆβ–ˆβ–ˆ β–€ β–„β–„ \n β–„β–ˆβ–ˆβ–ˆβ–€β–€β–ˆβ–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–„β–€β–€β–€β–€β–€β–€β–ˆβ–Œ \n β–ˆβ–ˆβ–€β–„β–„β–„β–ˆβ–ˆβ–€β–„β–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆ \n β–„β–€β–€β–€β–„β–ˆβ–ˆβ–„β–€β–€β–Œβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’β–’β–’β–’β–’β–ˆβ–ˆβ–ˆ β–Œβ–„β–„β–€ \nβ–Œ β–β–€β–ˆβ–ˆβ–ˆβ–ˆβ–β–ˆβ–ˆβ–ˆβ–’β–’β–’β–’β–’β–β–ˆβ–ˆβ–Œ \nβ–€β–„β–„β–„β–„β–€ β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–’β–’β–’β–’β–„β–ˆβ–ˆβ–€ \n β–€β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ \n β–„β–„β–ˆβ–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€β–ˆ \n β–„β–ˆβ–ˆβ–€ β–€β–€β–€ β–ˆ \n β–„β–ˆ β–β–Œ \n β–„β–„β–„β–„β–ˆβ–Œ β–€β–ˆβ–„β–„β–„β–„β–€β–€β–„ \nβ–Œ ▐ β–€β–€β–„β–„β–„β–€ \n β–€β–€β–„β–„β–€ \n\n', end='')"
@andrelramos
andrelramos / universidade.sql
Last active August 23, 2017 13:56
banco-universidade.sql
CREATE TABLE Professores (
matricula int unique,
nome varchar(300) unique not null,
rg int unique not null,
sexo char not null check (sexo in ('m', 'f')),
idade int check (idade >= 21 and idade <= 80),
titulacao varchar(11) check (titulacao in ('graducado', 'especialista', 'mestre', 'doutor')),
categoria varchar(11) check (categoria in ('auxiliar', 'assistente', 'adjunto', 'titular')),
nroTurmas int check (nroTurmas >= 0),
@andrelramos
andrelramos / 00.howto_install_phantomjs.md
Last active July 6, 2017 03:58 — forked from rahularyan/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 2.1.1

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
Program Portal ;
uses graph;
Type
// Generic types
position = record
x: integer;
y: integer;
end;
@andrelramos
andrelramos / Main.java
Created May 4, 2016 21:38
Hour exemple in J2ME
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
public class Main extends MIDlet {
private Display display;
private Form frmHour;
private StringItem hour;
@andrelramos
andrelramos / view.html
Created March 14, 2016 17:27
Exemplo de pesquisa AJAX (View)
{% extends "baseSemNavbar.html" %}
{% load inputtags %}
{% block title %}
<title>Consultar Colaboradores</title>
{% endblock %}
{% block scripts %}
<script>