Skip to content

Instantly share code, notes, and snippets.

View valkheim's full-sized avatar
🔥
ORUGKIDHMFWWKCQ=

valkheim

🔥
ORUGKIDHMFWWKCQ=
View GitHub Profile

root sur blinux4 El Tigre

  • 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
@valkheim
valkheim / intra_api.md
Created December 18, 2017 11:58 — forked from DupK/intra_api.md
Non-official list of Epitech Intra API endpoints

Epitech API

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.

Authentication

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.

Endpoints

API endpoints and what they require and do. JSON file of endpoints below the documentation.

@valkheim
valkheim / functional_c++.cpp
Created February 15, 2018 18:12
functionnal c++
#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);
};
}
@valkheim
valkheim / pi.c
Created February 15, 2018 18:14
pi, the ascii way
#define _ F-->00 || F-OO--;
long F=00,OO=00;
main(){F_OO();printf("%1.3f\n", 4.*-F/OO/OO);}F_OO()
{
_-_-_-_
_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
@valkheim
valkheim / treq.ml
Created April 9, 2018 07:09
chameau
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);;
package main
import (
"errors"
"fmt"
)
type queue struct {
Type string
Q []interface{}
package main
import (
"fmt"
"reflect"
)
type Plop struct {
A string
}
@valkheim
valkheim / levensthein_distance.js
Created April 23, 2018 16:06
Levenshtein distance
'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)
@valkheim
valkheim / MifareClassicDump.ino
Created August 15, 2018 22:03
Révision du dump exemple fourni avec la lib Adafruit pour le pn532
#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);
@valkheim
valkheim / Lexer.java
Created September 1, 2018 20:24
Basic java lexer
// 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]+");