Skip to content

Instantly share code, notes, and snippets.

View ealvesss's full-sized avatar
🏠
esq :q!

Elton Alves ealvesss

🏠
esq :q!
View GitHub Profile
@ealvesss
ealvesss / youtube_unsub_channel.js
Created January 17, 2024 19:36
Youtube Channel Unsubscriber
(async function iife() {
// This is the time delay after which the "unsubscribe" button is "clicked"; Tweak to your liking!
var UNSUBSCRIBE_DELAY_TIME = 2000;
/**
* Delay runner. Wraps setTimeout so it can be awaited on.
* @param {number} delay
*/
var wait = (delay) => new Promise((resolve) => setTimeout(resolve, delay));
@ealvesss
ealvesss / tapoemulator.md
Created November 21, 2023 17:38
tapo-smart-hub-emulator

Tapo Smart Hub


This integration is part of HACS store

Running docker image

@ealvesss
ealvesss / mobile-account.js
Last active April 29, 2023 20:54
zeldinha
{
"data": {
"teams": [
{
"teams": [],
"id": "69557888-644b-4394-8dbd-178bb1ac928a",
"cpf": null,
"birthday": null,
"cellphone": "11198189189",
"dialog": null,
---
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
---
<script
type="text/javascript"
src="https://integrations.memed.com.br/modulos/plataforma.sinapse-prescricao/build/sinapse-prescricao.min.js"
data-token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WzQ3MzQ2LCJkMzNmOWQ4NjNhOTI3NTdiNmFjNmRhY2JmYzNiNDhmNSIsIjIwMjMtMDMtMzAiLCJzaW5hcHNlLnByZXNjcmljYW8iLCJwYXJ0bmVyLjMuNDI2MjMiXQ.jD3WEaAiCS1wiS7KFftzW1afxJAE6YekK1EmTMF2CHI">
@ealvesss
ealvesss / ealves.py
Created March 29, 2023 20:19
drox1234
### Para criar um script em Python que analise as possibilidades de vitória no futebol utilizando as APIs do site Betfair.com, você precisará seguir estas etapas:
- Crie uma conta no Betfair e obtenha uma chave de API.
- Instale as bibliotecas necessárias (requests e pandas, por exemplo).
- Faça solicitações à API para obter dados das partidas e das probabilidades.
- Analise os dados e calcule as possibilidades de vitória.
- Aqui está um exemplo básico de script para você começar:
import requests
@ealvesss
ealvesss / blah.sql
Created February 22, 2023 12:57
function
create function export_lime_data() returns trigger
language plpgsql
as
$$
DECLARE v_sid INT;
v_gid INT;
v_qid INT;
v_type VARCHAR(1);
v_title VARCHAR(10);
v_question VARCHAR(500);
@ealvesss
ealvesss / lime_survey_function.sql
Last active December 15, 2022 15:53
lime survey postgres function to extract questions and answers from database (database version -> 491)
-- author: elton alves
-- email: eltim.alves@gmail.com
-- date: 14-12-2022
-----------------------------------------------------------------------------------
-- you sould change some parts to fit to your spectations, any question email me! -
-----------------------------------------------------------------------------------
drop function if exists lime.export_limesurvey_data(integer);
create function lime.export_limesurvey_data(p_surveyid integer)
returns TABLE(
@ealvesss
ealvesss / blah.log
Created November 9, 2022 17:28
error npm
npm info run node-sass@4.14.1 postinstall { code: 1, signal: null }
npm timing reify:rollback:createSparse Completed in 8738ms
npm timing reify:rollback:retireShallow Completed in 0ms
npm timing command:i Completed in 97033ms
npm verb stack Error: command failed
npm verb stack at ChildProcess.<anonymous> (/Users/ealves/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
npm verb stack at ChildProcess.emit (node:events:527:28)
npm verb stack at maybeClose (node:internal/child_process:1092:16)
npm verb stack at Socket.<anonymous> (node:internal/child_process:451:11)
npm verb stack at Socket.emit (node:events:527:28)
@ealvesss
ealvesss / csvparse.cs
Created September 6, 2022 19:41
asdasd
using System;
using System.Buffers;
using System.ComponentModel.Design;
using System.IO;
using System.IO.Pipelines;
using System.Text;
using System.Threading.Tasks;
using iot.project.domain.entities;
namespace iot.project.service.Util
@ealvesss
ealvesss / flutter.dart
Created August 15, 2022 21:36
chat-twilio
Future<void> sendMessage({required String accountSid, required String authToken, required String sidConversation, required String message})async{
var cred = '$accountSid:$authToken';
var bytes = utf8.encode(cred);
var base64Str = base64.encode(bytes);
String url = 'https://conversations.twilio.com/v1/Conversations/CH1007ef70dfbb43b0a4fbb84d5484cb64/Messages';
var response = await http.post(Uri.parse(url),
headers: {