Skip to content

Instantly share code, notes, and snippets.

View Genarito's full-sized avatar
🚀
Working

Genaro Camele Genarito

🚀
Working
View GitHub Profile
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active September 25, 2024 10:49
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@miku
miku / rastrigin.png
Last active January 17, 2022 16:20
Rastrigin Python
rastrigin.png
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active September 26, 2024 18:18 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@gschizas
gschizas / requestsprogress.py
Created September 16, 2012 11:04
Requests with progressbar in python
r = requests.get(file_url)
size = int(r.headers['Content-Length'].strip())
self.bytes = 0
widgets = [name, ": ", Bar(marker="|", left="[", right=" "),
Percentage(), " ", FileTransferSpeed(), "] ",
self,
" of {0}MB".format(str(round(size / 1024 / 1024, 2))[:4])]
pbar = ProgressBar(widgets=widgets, maxval=size).start()
file = []
for buf in r.iter_content(1024):