Skip to content

Instantly share code, notes, and snippets.

Avatar
🍊
I don't hate you

Amaury Carrade AmauryCarrade

🍊
I don't hate you
View GitHub Profile
@AmauryCarrade
AmauryCarrade / import_users.sh
Created Oct 26, 2020
Imports users from another permissions plugin to luckperms
View import_users.sh
#!/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 Oct 24, 2020
Converts ZePS stations enum to dynmap markers
View zeps-to-dynmap.py
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 Apr 7, 2019
Extraction de données d'AirBNB
View Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "*"
beautifulsoup4 = "*"
View Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
requests = "*"
beautifulsoup4 = "*"
@AmauryCarrade
AmauryCarrade / fluxbb-to-bcrypt.diff
Last active Mar 24, 2017
Migration de FluxBB vers BCrypt
View fluxbb-to-bcrypt.diff
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 Dec 26, 2016
Per-thread search for FluxBB
View per-thread-search.diff
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 Dec 9, 2016
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+.
View irc.json
{"#chan": ["CheshireScrat", "Ichi", "Voren", "Anna", "GLaDOS", "Guy", "Swaps", "@Amaury", "Fanch"]}
View mumble_status.json
{
"channels": [
{
"name": "Zcraft",
"path": [
"Zcraft"
],
"position": 0,
"users": [
{
@AmauryCarrade
AmauryCarrade / previous_message.diff
Last active Sep 13, 2016
Changes to display the last message of the previous page on FluxBB
View previous_message.diff
diff --git a/style/Air.css b/style/Air.css
index 043112a..003d23b 100755
--- a/style/Air.css
+++ b/style/Air.css
@@ -1516,6 +1516,10 @@ html, body, .pun {
border-color: #dfe6ee;
}
+.pun .backpost .postbody, .pun .backpost .postfoot {
+ background: #f6f9fc;
@AmauryCarrade
AmauryCarrade / viewtopic.php.diff
Last active Sep 4, 2016
Changes to display ranks on FluxBB topics
View viewtopic.php.diff
diff --git a/viewtopic.php b/viewtopic.php
index 87f47b5..9b36032 100755
--- a/viewtopic.php
+++ b/viewtopic.php
@@ -194,6 +194,53 @@ require PUN_ROOT.'header.php';
<?php
+// ------ DISPLAYED RANKS ON THE FORUMS - CONFIG
+