- grub : e pour entrer dans la conf de l'entrée BLINUX 4.0 El Tigre
- ajouter init=/bin/sh a la ligne commençant par linuxefi
- F10
- su -
- sudo mount -o remount, rw /
- passwd
- sync
- CTRL-D CTRL-D
Epitech's API is located at https://intra.epitech.eu/
and for the most part is any intranet page with the format=json
param added.
To access most endpoints a PHPSESSID
cookie must be set to an authenticated session. Authentification can be done with an autologin code or via Office 365 oauth.
API endpoints and what they require and do. JSON file of endpoints below the documentation.
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
#include <vector> | |
#include <numeric> | |
#include <cstdio> | |
auto foldable(auto col) { | |
return [col](auto f, auto initial) { | |
return std::accumulate(col.begin(), col.end(), initial, f); | |
}; | |
} |
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
#define _ F-->00 || F-OO--; | |
long F=00,OO=00; | |
main(){F_OO();printf("%1.3f\n", 4.*-F/OO/OO);}F_OO() | |
{ | |
_-_-_-_ | |
_-_-_-_-_-_-_-_-_ | |
_-_-_-_-_-_-_-_-_-_-_-_ | |
_-_-_-_-_-_-_-_-_-_-_-_-_-_ | |
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | |
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ |
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
let rec appartenance f e = match e with | |
|[]-> false | |
|t::q-> if f=t then true else (appartenance f q);; | |
let res = appartenance ["valkheim"] ["valkheim";"niflheim";"muspelheim"];; | |
let rec ajout f e = match e with | |
|[]-> [f] | |
|t::q-> if f=t then e else t::(ajout f q);; |
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 main | |
import ( | |
"errors" | |
"fmt" | |
) | |
type queue struct { | |
Type string | |
Q []interface{} |
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 main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Plop struct { | |
A string | |
} |
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
'use strict' | |
const levenshtein = (a, b) => { | |
if (a.length == 0) return b.length | |
if (b.length == 0) return a.length | |
// swap to save some memory O(min(a,b)) instead of O(a) | |
if (a.length > b.length) | |
b = [a, a = b][0] | |
let row = [] | |
for (let i = 0 ; i <= a.length ; ++i) |
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
#include <Adafruit_PN532.h> | |
#define PN532_IRQ (2) | |
#define PN532_RESET (3) // Not connected by default on the NFC Shield | |
// Shield with an I2C connection: | |
Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET); | |
void setup(void) { | |
Serial.begin(115200); |
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
// http://www.giocc.com/writing-a-lexer-in-java-1-7-using-regex-named-capturing-groups.html | |
// javac Lexer.java && java Lexer | |
import java.util.ArrayList; | |
import java.util.regex.Pattern; | |
import java.util.regex.Matcher; | |
public class Lexer { | |
private static enum Token { | |
NUMBER("-?[0-9]+"), OPERATOR("[*|/|+|-]"), SKIP("[ \t\f\r\n]+"); |
OlderNewer