This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// ☢️ WARNING: If you are alergic to messy cowboy codes, please don't read the code below ☢️ | |
// | |
// # Intro: | |
// | |
// This snippet of magic is to test rrweb as a possible replacement to FullStory. It uses badger as storage because I | |
// didn't want to deal with setting up a container and migrations for storage. | |
// > FullStory is a tool to record user sessions for further analysis (can be for debugging, UX etc) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"os" | |
"sync" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
"sync" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "bytes" | |
func StreamToByte(stream io.Reader) []byte { | |
buf := new(bytes.Buffer) | |
buf.ReadFrom(stream) | |
return buf.Bytes() | |
} | |
func StreamToString(stream io.Reader) string { | |
buf := new(bytes.Buffer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"errors" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests # to handle http and https requests and responses | |
import time # make program to sleep based on specified interval of time | |
# ------------------------------------- | |
# LIST OF VIRUS TOTAL REST API'S | |
# ------------------------------------- | |
IP_ADDRESS_API = "https://www.virustotal.com/vtapi/v2/ip-address/report" | |
DOMAIN_API = "https://www.virustotal.com/vtapi/v2/domain/report" | |
URL_REPORT_API = "https://www.virustotal.com/vtapi/v2/url/report" | |
URL_SCAN_API = "https://www.virustotal.com/vtapi/v2/url/scan" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.bogotobogo.com/GoLang/GoLang_Visual_Studio_Code.php | |
https://golangbot.com/variables/ | |
Tổng hợp tài liệu Golang từ cơ bản đến nâng cao cho beginner: | |
Trang chủ: https://golang.org | |
Official docs: https://golang.org/doc | |
Official blog: https://blog.golang.org | |
Training Golang cơ bản: https://tour.golang.org (Khuyến khích xem trước, rất dễ học) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
import time | |
import hashlib | |
from flask import Flask, render_template, redirect, url_for, request | |
from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class | |
from flask_wtf import FlaskForm | |
from flask_wtf.file import FileField, FileRequired, FileAllowed | |
from wtforms import SubmitField |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sum_digits(number): | |
str_number = str(number) | |
sum = 0 | |
for i in range(0, len(str_number)): | |
sum += int(str_number[i]) | |
return sum | |
sum_digits(2**1000) | |
>>>1366 | |
sum(int(num) for num in str(2**1000)) >>> 1366 |
NewerOlder