Skip to content

Instantly share code, notes, and snippets.

@m-242
m-242 / Ex3.java
Created October 30, 2018 18:18
Une résolution d'exo pour un td
class Ex3
{
//fonctions de chiffrement et déchiffrement
public static String chiffre(String message, String cle)
{
String renvoi = "";
for(int i =0; i<message.length(); i++)
{
public class Etudiant{
public static String nom, prenom;
public static int num;
public static int note;
public Etudiant(String n, String p, int ne, int no){
nom = n;
prenom = p;
num = ne;
note = no;
// ==UserScript==
// @name Autofill univ-paris-diderot CAS
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Auto fill and submit CAS for P7's website
// @author m242
// @include *auth.univ-paris-diderot.fr/cas/*
// @grant none
// ==/UserScript==
@m-242
m-242 / init.el
Created February 12, 2019 21:25
;;; init.el --- My try at making a clean emacs config that fits my needs
;;; Commentary:
;;; Code:
;;; Automatic stuff
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
/*
* @Author: m242
* @Date: 2019-02-25 09:41:21
* @Last Modified by: m242
* @Last Modified time: 2019-02-25 14:43:32
*/
class Automate{
// Attributs et accesseurs
private Cellule start;
private Cellule stop;
public class Noeud {
private String etiquette;
private Noeud gauche;
private Noeud droit;
public Noeud(String etiquette, Noeud g, Noeud d){
this.etiquette = etiquette;
this.gauche = g;
this.droit = d;
}
<?php
require_once(__DIR__ . '/../lib/functions_db.php');
require_once(__DIR__ . '/../lib/functions_input_sanatizing.php');
// Les fonctions utilisées
function check_login(){
// récup des valeurs du formulaire
William Gibson
Neuromancer
Dedication:
for Deb
who made it possible
with love
@m-242
m-242 / redirectServer.py
Created March 26, 2020 10:54
A stupid redirection looping server, because why rewrite it each time I use it ?
from http.server import HTTPServer, BaseHTTPRequestHandler
class redirectHandler(BaseHTTPRequestHandler):
def do_GET(self):
""" Looping redirections """
path = "/a" if self.path == "/b" else "/b"
self.send_response(301)
self.send_header("Location", path)
@m-242
m-242 / notes.sh
Last active December 5, 2020 08:07
Note taking
#!/bin/sh
# A note simple note taking script, in Markdown format.
# Needs st and dmenu.
editnote() {
st "-c" 'Notes' "-i" "-e" "$EDITOR" "$1"
}
get_file() {
choice=$(printf \