Skip to content

Instantly share code, notes, and snippets.

View TiagoDanin's full-sized avatar
🎯
Focusing

Tiago Danin TiagoDanin

🎯
Focusing
View GitHub Profile
@TiagoDanin
TiagoDanin / img.lua
Last active December 13, 2015 21:18
#FIX Google Bot (Telegram-bot) Yagop
-- BY: Telegram:@TiagoDanin -:- Twitter:@_TiagoEDGE
function run(msg, matches)
local input = matches[1]
local receiver = get_receiver(msg)
local url = 'https://www.googleapis.com/customsearch/v1?'
url = url .. 'key=0000' -- KEY Get https://console.developers.google.com/apis/credentials
url = url .. '&cx=00000:abcd' -- CX Get https://cse.google.com/cse
url = url .. '&searchType=image&imgSize=xlarge&alt=json&num=5&start=1'
@TiagoDanin
TiagoDanin / code.lua
Created February 7, 2016 14:39
Plugin Code Highlighter for yagop/telegram-bot
-- Based on plugin Webshot
local helpers = require "OAuth.helpers"
local base = 'https://screenshotmachine.com/'
local url = base .. 'processor.php'
local function get_webshot_url(param)
local response_body = {}
local request_constructor = {
url = url,
@TiagoDanin
TiagoDanin / DuckDuckGo.lua
Created May 4, 2016 18:27
DuckDuckGo for otouto
local command = 'DuckDuckGo'
local doc = [[
DuckDuckGo <3
]]
local triggers = {
'^/duckduckgo[@'..bot.username..']*',
}
local action = function(msg)
@TiagoDanin
TiagoDanin / jacknot.moon
Created June 5, 2016 20:23
Multi thread Jack
export moonscript = require "moonscript.base"
export http = require "socket.http"
export https = require "ssl.https"
export URL = require "socket.url"
export ltn12 = require "ltn12"
export serpent = require "serpent"
export socket = require "socket"
export JSON = require "cjson"
export colors = require 'ansicolors'
lanes = require"lanes".configure{
@TiagoDanin
TiagoDanin / #28 Max Of Three.py
Last active June 24, 2016 20:05
Max Of Three
'''Max Of Three http://www.practicepython.org/exercise/2016/03/27/28-max-of-three.html
Exercise
Implement a function that takes as input three variables, and returns the largest of the three. Do this without using the Python max() function!
The goal of this exercise is to think about some internals that Python normally takes care of for us. All you need is some variables and if statements!'''
num1 = int(raw_input("Put number 1:"))
num2 = int(raw_input("Put number 2:"))
num3 = int(raw_input("Put number 3:"))
@TiagoDanin
TiagoDanin / Desafio.txt
Created July 22, 2016 18:27
PyCoding - pt_BR - Desafios nvl 3
!#Desafios nvl 3
Faça um programa que leia um arquivo texto contendo uma lista de endereços IP e gere um outro arquivo, contendo um relatório dos endereços IP válidos e inválidos.
O arquivo de entrada possui o seguinte formato:
200.135.80.9
192.168.1.1
8.35.67.74
257.32.4.5
85.345.1.2
@TiagoDanin
TiagoDanin / DontEditBot.json
Created August 27, 2016 14:28
[Translation] [DontEditBot] Português(PT-BR) - Portuguese(EN)
"PT": {
"start": "<b>Olá!</b> \nEu sou um bot desenvolvido para <b>tirar sarro das pessoas 😅</b> \nConvide-me para seus grupos e adicione seus amigos para nos divertimos muito juntos! \n<b>Bem o meu trabalho é se alguém editar a sua messagem em um grupo, eu vou notificá-lo do que ele ou ela disse antes.</b> \nConvide-me para os grupos usando este link! \nhttp://telegram.me/DontEditBot?startgroup=new",
"first_edit": [
"\nPor que você editou sua mensagem? Eu vi o que você disse \nVocê disse:\n",
"\nEu vi o que você disse antes! 😎Editar será inútil agora!\n",
"\nEu vi o que você disse!😎\nSinta-se livre para editar novamente. Eu sempre sei!\nVocê disse:\n",
"\nNovamente você editou sua mensagem! Mas eu vi o que você disse! Você disse:\n",
"\n👮🏻(Dont edit bot) é como um policial e se preocupa com o que você diz! Você disse:\n",
"\nPor que você editou sua mensagem? Eu vi o que você disse\nVocê disse:\n"
],
@TiagoDanin
TiagoDanin / gist:d88299795fb755b33aef3836b1570c29
Created October 3, 2016 15:18
Testing lanes in GroupButler
local triggers = {
config.cmd..'test (.*)'
}
local function lanes_test(check)
local n = 0
while check do
n = n + 1
print(check)
end
@TiagoDanin
TiagoDanin / FixW10.reg
Created August 15, 2017 14:14
My fix Windows 10
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack\TestHooks]
"Disabled"=dword:00000001
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection]
"AllowTelemetry"=dword:00000000
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection]
"AllowTelemetry"=dword:00000000
@TiagoDanin
TiagoDanin / bot43274823.py
Created January 22, 2018 14:44
Exemplo de como editar mensagem usando o pyTelegramBotAPI(Telebot)
import telebot
bot = telebot.TeleBot("")
chat_id = ""
data = bot.send_message(chat_id, "Isso é um texto")
#edit_message_text(self, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None, disable_web_page_preview=None, reply_markup=None)
if data:
bot.edit_message_text("Isso é um novo texto", data.chat.id, data.message_id)