Skip to content

Instantly share code, notes, and snippets.

View AmauryCarrade's full-sized avatar
🍊
I don't hate you

Amaury Carrade AmauryCarrade

🍊
I don't hate you
View GitHub Profile
@AmauryCarrade
AmauryCarrade / leaderboard.py
Last active May 13, 2023 19:55
Minecraft Server Stats Leaderboard
import glob
import functools
import json
import pathlib
import uuid
import os
import click
import requests
@AmauryCarrade
AmauryCarrade / draw-twitter.py
Created February 21, 2022 15:47
Script utilisé pour tirer au sort pour Zeste de Savoir le 21 février 2022
import datetime
import json
import os
import random
import time
import click
from dotenv import load_dotenv
from pytwitter import Api
@AmauryCarrade
AmauryCarrade / import_users.sh
Created October 26, 2020 11:50
Imports users from another permissions plugin to luckperms
#!/usr/local/bin/bash
users_yaml='./users.yml'
uuid=''
while read -r line
do
if [[ "$line" == "users:" ]] || [[ "$line" == "groups:" ]] || [[ "$line" == permissions* ]]; then
continue
@AmauryCarrade
AmauryCarrade / zeps-to-dynmap.py
Last active October 24, 2020 19:05
Converts ZePS stations enum to dynmap markers
lines = []
stations = []
declarations_started = False
netherroutes_started = False
with open("./Station.java") as f:
lines = f.readlines()
for line in lines:
@AmauryCarrade
AmauryCarrade / Pipfile
Created April 7, 2019 20:37
Extraction de données d'AirBNB
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "*"
beautifulsoup4 = "*"
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "*"
beautifulsoup4 = "*"
@AmauryCarrade
AmauryCarrade / fluxbb-to-bcrypt.diff
Last active March 24, 2017 10:38
Migration de FluxBB vers BCrypt
diff --git a/include/common.php b/include/common.php
index 1661f58..3af340a 100644
--- a/include/common.php
+++ b/include/common.php
@@ -45,6 +45,16 @@ if (!defined('PUN'))
exit;
}
+// If the password config is missing, here are some default values
+if (!isset($password_hash_options) || empty($password_hash_options))
@AmauryCarrade
AmauryCarrade / per-thread-search.diff
Last active December 26, 2016 23:59
Per-thread search for FluxBB
diff --git a/search.php b/search.php
index 28c4661..0822fd2 100755
--- a/search.php
+++ b/search.php
@@ -29,6 +29,7 @@ if (isset($_GET['action']) || isset($_GET['search_id']))
{
$action = (isset($_GET['action'])) ? $_GET['action'] : null;
$forum = (isset($_GET['forum'])) ? intval($_GET['forum']) : -1;
+ $topic = (isset($_GET['topic'])) ? intval($_GET['topic']) : -1;
$sort_dir = (isset($_GET['sort_dir']) && $_GET['sort_dir'] == 'DESC') ? 'DESC' : 'ASC';
@AmauryCarrade
AmauryCarrade / irc.json
Last active December 9, 2016 01:37
Script to retrieve the users list in an IRC channel without running a bot. The “bot“ does not connects to the channels. Intended to be executed periodically. Does not works with secret (+s) channels. Python 2.7+.
{"#chan": ["CheshireScrat", "Ichi", "Voren", "Anna", "GLaDOS", "Guy", "Swaps", "@Amaury", "Fanch"]}
@AmauryCarrade
AmauryCarrade / mumble_status.json
Last active December 9, 2016 01:38
Mumble dump
{
"channels": [
{
"name": "Zcraft",
"path": [
"Zcraft"
],
"position": 0,
"users": [
{