Skip to content

Instantly share code, notes, and snippets.

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

Alice Girard Guittard zer0tonin

🏳️‍⚧️
View GitHub Profile
Feature: bank account
A user's bank account must be able to withdraw and deposit cash
Scenario Outline: Deposit
Given I have a bank account with <start>$
When I deposit <deposit>$
Then it should have a balance of <end>$
Examples:
| start | deposit | end |
@zer0tonin
zer0tonin / init.vim
Last active November 19, 2020 15:37
NeoVim config for python and JS
" Requirements :
" plug.vim
" pip3 install neovim
" npm install -g neovim
" Post-setup
" :PlugInstall
" :UpdateRemotePlugins
" :CocInstall coc-json coc-tsserver
" pyenv
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
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:
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];
}
@zer0tonin
zer0tonin / Pancake.java
Last active August 19, 2019 14:26
Pancake Sorting algorithm
public class Pancake {
private int size;
public Pancake(int size) {
this.size = size;
}
public int size() {
return size;
}
@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() {
@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;
}
" 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'
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">