Skip to content

Instantly share code, notes, and snippets.

View MP-C's full-sized avatar
🎯
Focusing

MP-C

🎯
Focusing
View GitHub Profile
@MP-C
MP-C / forFun.js
Last active July 26, 2022 13:16
toTurnAroundWebImageFromConsole
/*Juste to make fun wiht a collegue when he leaves the pc's on*/
/*After F12 */
/*Copy-Paste in in console */
/*to turn the WebWindow around */
(function(){
document.documentElement.style.transitionDuration='30s';
document.documentElement.style.transistionTimingFunction="ease-in";
document.documentElement.style.transform="rotate(360deg)";
}());
@MP-C
MP-C / Variables.java
Created June 4, 2022 16:01
03 Variables Java Film
public class Varibles {
public static void main(String[] args) {
String title = "Indiana Jones and the Last Crusade";
System.out.println("title :");
System.out.println(title);
boolean disISeeTheMovie = true;
System.out.println("disISeeTheMovie :");
System.out.println(disISeeTheMovie);
int year = 1989;
System.out.println("year :");
@MP-C
MP-C / CandyCoount.java
Created June 4, 2022 15:32
Java 02 Algrithmique
public class CandyCount {
public static void main(String[] args) {
double realMoney = 12.4;
double realPrice = 1.2;
int candies = 0;
if (realMoney > 0 && realPrice > 0){
while ((realMoney - realPrice) >= 0) {
candies = candies + 1;
realMoney = realMoney - realPrice;
}
@MP-C
MP-C / Senpai.java
Created June 4, 2022 15:10
JDK in Java first Programme
public class Senpai {
public static void main(String[] args) {
System.out.println("Notice me Senpai");
}
}
@MP-C
MP-C / main.cs
Created April 5, 2022 10:16
1. List<T>
using System;
using System.Collections.Generic; // list and vectors
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
List<string> stringCharacteres = new List<string>();
@MP-C
MP-C / main.cs
Last active April 5, 2022 08:41
1. Les nombres entiers
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
@MP-C
MP-C / main.cs
Created March 10, 2022 14:36
1. Les classes
using System;
public class Character
{
public string name;
public int pv;
public int force;
public int defense;
@MP-C
MP-C / .sql
Last active March 10, 2023 22:00
ScriptMediumMySQLtrainning
--to create the database
CREATE DATABASE 'filmsAndActors';
USE 'filmsAndActors';
SHOW TABLES;
--to clean this tables on DataBase, in case you have been pratice
DROP TABLE castM;
DROP TABLE gender_film;
DROP TABLE people;
DROP TABLE film;
@MP-C
MP-C / Challenge_CSRF_attack_cookies.js
Last active June 20, 2021 14:35
Security : attack and cookies - implemented with Express
const express = require("express");
require("dotenv").config();
const app = express();
const router = express.Router();
const port = process.env.PORT || 5000;
const sessionCookie = require("express-session");
app.use("/", router);
app.use(
@MP-C
MP-C / Challenge_jets.js
Created June 14, 2021 20:33
Security: XSS attack and data validation - implemented with React and Express
const express = require('express');
const session = require('express-session');
const bodyParser = require('body-parser');
const cache = require('memory-cache');
const passport = require('passport');
const { check, validationResult } = require('express-validator/check');
// app.integration.spec.js
const request = require('supertest');