Skip to content

Instantly share code, notes, and snippets.

View gubareve's full-sized avatar

Evan Gubarev gubareve

View GitHub Profile
@gubareve
gubareve / license-gpl-python-header.txt
Created June 28, 2020 18:19 — forked from ilg-ul/license-gpl-c-header.txt
Python header with GPL license text.
#
# This file is part of the XXX distribution (https://github.com/xxxx or http://xxx.github.io).
# Copyright (c) 2015 Liviu Ionescu.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
@advaith1
advaith1 / top bots.md
Last active May 2, 2024 15:40
The top Discord bots ranked by server count
Rank Bot Approximate Server Count Library
1 MEE6 21,600,000 Custom Python
2 Rythm 🪦 15,200,000 JDA
3 Groovy 🪦 10,400,000 JDA, Discord4J
4 carl-bot 🅱️ 9,770,000 Pycord
5 ProBot
#!/usr/bin/env python3
triviafile = 'trivia.csv'
apiurl = 'https://opentdb.com/'
sleep_between_requests = 0.1
questionsPerRequest = 50
import requests, os, hashlib, json, sys, csv, urllib, time
unquote = urllib.parse.unquote
@nornagon
nornagon / 1-intro.md
Last active April 20, 2024 18:48
How to make a Minecraft (1.8) mod

How to make a Minecraft mod

Minecraft mods, especially mods which change the client, are by and large written with Forge. If you visit their website, you'll be greeted abruptly by a mysterious message at the top of an SMF forum, with no clear path towards actually... making a mod. I'm documenting here the steps I went through to get started, in the hopes of helping the next person have an easier time of it.

I'll be using Scala for this guide, but it should be fairly easy to adapt these instructions to any JVM language (e.g. clojure or if you're feeling masochistic, Java). I'm also developing on OS X, so some of the commands will be a little different if you're on Linux or Windows. I'm assuming you have some proficiency with your operating system, so I won't go into details about how to adapt those commands to your system.

Background

Minecraft doesn't have an official mod API (despite early [promises](http://notch.t

@mandiwise
mandiwise / Count lines in Git repo
Last active May 16, 2024 13:28
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l