Skip to content

Instantly share code, notes, and snippets.

View zer0tonin's full-sized avatar
🏳️‍⚧️

Alice Girard Guittard zer0tonin

🏳️‍⚧️
View GitHub Profile
@zer0tonin
zer0tonin / MainClass.java
Created November 18, 2016 19:58
Minimal AV engine
import java.io.*;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
public class MainClass {
@zer0tonin
zer0tonin / index.html
Created November 22, 2016 01:58
Simple XSS removal in Node JS
<html>
<head>
<title>XSS Protector!</title>
<meta charset="utf-8">
</head>
<body>
<form method="post" action="result">
<label for="input">Input : </label>
<input type="text" name="input"></input>
</form>
import React from 'react';
import Grid from 'react-mdc-web/lib/Grid/Grid';
import Cell from 'react-mdc-web/lib/Grid/Cell';
import Textfield from 'react-mdc-web/lib/Textfield/Textfield';
export default function ComingSoon() {
return (
<div>
<h1 style={{ textAlign: 'center' }}>{'Coming soon'}</h1>
<Grid>
import React from 'react';
import Textfield from 'react-mdc-web/lib/Textfield/Textfield';
export default function ComingSoon() {
return (
<div>
<h1 style={{ textAlign: 'center' }}>{'Coming soon'}</h1>
<div className="mdc-layout-grid">
<div className="mdc-layout-grid__inner">
<div className="mdc-layout-grid__cell mdc-layout-grid__cell--span-3">
" plugins
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'StanAngeloff/php.vim'
Plug 'Valloric/YouCompleteMe'
Plug 'vim-syntastic/syntastic'
Plug 'cocopon/iceberg.vim'
Plug 'mileszs/ack.vim'
Plug 'jiangmiao/auto-pairs'
@zer0tonin
zer0tonin / main.c
Created August 30, 2017 12:40
Daily programmer #329 easy
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int *initializeNumbers(int size) {
int *numbers = malloc(sizeof(int) * size);
for(int i = 0; i < size; i++) {
numbers[i] = i + 1;
}
@zer0tonin
zer0tonin / Counter.java
Created October 1, 2017 18:13
An overengineered FizzBuzz
public class Counter {
private int count = 1;
private int max;
public Counter(int max) {
this.max = max;
}
public int getCount() {
import java.util.LinkedList;
import java.lang.Object;
public class HashTable {
private final int size = 100;
private final LinkedList<Object>[] keyValues;
public HashTable() {
keyValues = new LinkedList[size];
}
def weak_goldbach(number):
if is_pair(number):
raise InvalidNumberError(number + "is pair")
if number <= 5:
raise InvalidNumberError(number + "is equal or less than 5")
primes = find_primes_before_number(number)
return three_primes_sum(number, primes)
def is_pair(number):
if number % 2 == 0:
class BinaryNode:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
class CompleteBinaryTree:
def __init__(self, start: BinaryNode) -> None:
self.start = start
self.counter = 0