This file contains 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 | |
# | |
# Script: example.sh | |
# Author: Example Author <autor@example.com> | |
# Description: | |
# This script is an example for writing good bash script. | |
# Source: Gronono's Github Gist (https://gist.github.com/gronono/cbccbefdd93a3618ad400eb83cb50c4a) | |
# Changelog: | |
# YYYY-MM-DD: some modifications |
This file contains 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 java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.InvalidAlgorithmParameterException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Cipher; |
This file contains 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 base64 | |
from Crypto.Cipher import DES3 | |
import os | |
import pprint | |
REMMINA_PREF_FILE = os.getenv('HOME') + '/.config/remmina/remmina.pref' | |
REMMINA_FOLDER = os.getenv('HOME') + '/.local/share/remmina/' |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
# Inspiré de https://dzone.com/articles/how-to-create-a-keylogger-for-linux-using-python | |
# Pour comprendre la structure des events: | |
# https://stackoverflow.com/a/16695758/2909535 | |
# https://www.kernel.org/doc/Documentation/input/input.txt | |
# https://pubs.opengroup.org/onlinepubs/7908799/xsh/systime.h.html | |
from datetime import datetime |
This file contains 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 java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import lombok.Getter; | |
import lombok.extern.slf4j.Slf4j; | |
@Getter | |
@Slf4j | |
public class JdbcUrlParser { |
This file contains 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
package nc.unc.trec.progression.batch; | |
import java.util.Optional; | |
import java.util.function.Function; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.domain.Pageable; | |
import lombok.RequiredArgsConstructor; |
This file contains 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/sh | |
# Pensez à s'ajouter dans la whitelist pour le contrôle distant sur le NAS | |
# vi /usr/syno/etc/packages/DownloadStation/download/settings.json | |
# ps w | grep transmission | |
# kill -HUP <pid> | |
REMOTE="192.168.1.2:9093" | |
ANNOUNCE="https://tracker.t411.al/<tracker-key>/announce" |
This file contains 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
@Configuration | |
public class LogbackConfig { | |
@Autowired | |
private MBeanServer mbeanServer; | |
@PostConstruct | |
public void registerJmxConfigurator() throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException { | |
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); | |
ObjectName objectName = new ObjectName(MBeanUtil.getObjectNameFor(loggerContext.getName(), JMXConfigurator.class)); |