This file contains hidden or 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
var logLevel = zerolog.InfoLevel | |
var logout = zerolog.ConsoleWriter{ | |
Out: os.Stdout, | |
TimeFormat: time.RFC3339, | |
} | |
func init() { | |
if os.Getenv("GLOG") == "warn" { | |
logLevel = zerolog.WarnLevel | |
} else if os.Getenv("GLOG") == "no" { |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
to_replace = ":" | |
replace_by = " " | |
DRY_RUN = False | |
for (dirpath, dirnames, filenames) in os.walk("/root/of/path", topdown=False): | |
if DRY_RUN: | |
print("DRY RUN ", end="") |
This file contains hidden or 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
<?php | |
$user = new BlekUser($_SESSION["UID"], true); | |
?> | |
<br> | |
<div id="signPreview"></div> | |
<hr> | |
<button class="btn btn-primary" onclick="copySign()">Copier la signature</button> | |
<hr> |
This file contains hidden or 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
#!/bin/bash | |
#Author: Poul Serek | |
# Modified by Adrien Remillieux | |
shopt -s globstar | |
set -euo pipefail | |
echo "Starting Piwigo thumbnail generation" | |
This file contains hidden or 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
#! /usr/bin/env python3 | |
# this script assume that sendmail is working on your system | |
import socket | |
from email.mime.text import MIMEText | |
import subprocess | |
import re | |
subprocess.run(['apt', 'update'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) |
This file contains hidden or 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
#! /usr/bin/env bash | |
function tryUpload() { | |
(duplicacy backup -limit-rate 820 -threads 8 -stats) && | |
(duplicacy prune -exclusive -keep 360:360 -keep 30:180 -keep 7:30 -keep 1:7) | |
return $? | |
} | |
This file contains hidden or 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 sys | |
from PyQt5.QtCore import pyqtSignal | |
from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QWidget, QGridLayout, QCheckBox | |
class MainWindow(QMainWindow): | |
# fenetre principale, elle contient tout les trucs que tu vois s'afficher | |
def __init__(self): | |
super().__init__() |
This file contains hidden or 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
from datetime import datetime, timedelta | |
import random | |
from collections import OrderedDict, Counter | |
from pprint import pprint | |
from os import urandom | |
import os | |
from itertools import tee, islice, chain | |
class StudentClass: |