Skip to content

Instantly share code, notes, and snippets.

View andrepcg's full-sized avatar

André Perdigão Gonçalves andrepcg

View GitHub Profile
@andrepcg
andrepcg / accounts_with_lists.json
Created August 28, 2024 09:09
List account ids with leads since may
[229856,142282,213797,243212,219668,245742,219389,185153,248211,196633,161180,239291,95374,230313,219033,222841,240122,226330,200211,241997,226992,104887,200486,23723,132742,183576,233136,151657,222339,215614,247204,189868,156428,165829,247798,134940,240208,23234,227315,190538,232119,99917,108729,236778,214186,228718,203969,49406,239838,184872,242515,233209,225129,249362,233875,89602,59073,238476,137839,228625,60317,63035,137736,91765,218605,69644,246660,93748,213829,246789,206066,215804,200457,200621,239581,236800,154351,213872,216757,250770,218894,241770,239483,209305,189875,165572,139368,198654,241003,250257,152504,151098,237611,242997,247995,213330,68943,139461,221543,115455,249570,224691,225718,216861,238053,213228,214951,103115,216209,222593,196198,238369,238303,248388,239298,227403,230996,246080,54233,214385,191391,243729,235196,151218,79177,221320,210001,176782,200594,234181,198855,186692,146238,234733,210999,111507,95764,201345,188056,202547,217124,150719,218066,24744,239606,233378,217415,139329,2261
@andrepcg
andrepcg / temp-domains.txt
Created February 22, 2023 10:26
mailchecker 3.2.14 blocklist
0-mail.com
0815.ru
0clickemail.com
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
4warding.com
4warding.net
import socket
import struct
#Proxy script that receive CoAP message and forward them to Shelly HASS plugin.
#Use this if you have Shelly devices on other sub-net or VLAN
#Require ShellyForHASS 0.0.15 or later
#Change to the ip-address of your HASS server
HASS_IP = "192.168.1.XXX"
@andrepcg
andrepcg / data.txt
Created March 22, 2022 15:55
My test gist
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:83.250.242.30
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:81.228.197.47
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:82.183.52.236
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:88.80.166.189
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:77.53.218.35
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:81.235.35.152
9395b1a6-2888-11ea-b307-71b686771c6a folksam.se ::ffff:46.39.107.146
9395b1a6-2888-11ea-b307-71b686771c6a ::ffff:195.79.157.0/120
4541022c-e190-11e6-bf49-07548a7e5fbb handelsbanken.se ::ffff:13.53.47.110
4541022c-e190-11e6-bf49-07548a7e5fbb handelsbanken.se ::ffff:13.48.36.215
@andrepcg
andrepcg / data.json
Created March 21, 2022 15:33
My test gist
This file has been truncated, but you can view the full file.
@andrepcg
andrepcg / extracao_votacoes_parlamento.rb
Created October 17, 2020 11:29
Extrai resultado das votações na Assembleia da República
Proposal = Struct.new(:title, :votes_favor, :votes_against, :votes_abstention, :conclusion)
CONCLUSIONS = ['Aprovad', 'Rejeitad']
status = 'FINDING_START'
PARTIES_INDICES = nil
PARTIES_LINE_START = ' PS'
@andrepcg
andrepcg / dns.md
Created June 12, 2019 09:14
Usar Pi-Hole em todos os devices da rede (excepto box IPTV da vodafone)
  1. Activar servidor DHCP no Pi-Hole
  2. Criar ficheiro /etc/dnsmasq.d/03-vodafone.conf
  3. Adicionar a seguinte configuração ao ficheiro
dhcp-host=<MAC ADDRESS DA TV BOX>,set:vodafone
dhcp-option=tag:vodafone,option:dns-server,<IP DO ROUTER DA VODAFONE>

Agora a Box continua a funcionar porque usa o DNS que o router da Vodafone lhe dá e todos os restantes dispositivos na rede utilizam o DNS anunciado pelo servidor DHCP que é o do Pi-Hole

import React, { useState, useContext, useEffect } from "react";
import { Card, Row, Input, Text } from "./components";
import ThemeContext from "./ThemeContext";
function Greeting(props) {
let [name, setName] = useState("Harry");
let [surname, setSurname] = useState("Potter");
let theme = useContext(ThemeContext);
useEffect(() => {
import * as React from "react";
import { Card, Row, Input, Text } from "./components";
import ThemeContext from "./ThemeContext";
class Greeting extends React.Component {
constructor() {
super(...arguments);
this.state = {
name: "Harry",
sureName: "Potter",
import React, { useState } from "react";
const useCounter = (initialValue) => {
const [count, setCount] = useState(initialValue);
const increment = () => setCount(count + 1);
const decrement = () => setCount(count - 1);
return { count, increment, decrement };
};
function Counter() {