Skip to content

Instantly share code, notes, and snippets.

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

Alice Girard Guittard zer0tonin

🏳️‍⚧️
View GitHub Profile
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
@zer0tonin
zer0tonin / init.vim
Last active November 1, 2024 18:44
NeoVim config for go/python/js/gdscript
" Requirements :
" plug.vim
" pip3 install neovim
" npm install -g neovim
" Post-setup
" :PlugInstall
" :UpdateRemotePlugins
" :CocInstall coc-json coc-tsserver
" pyenv
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 / main.go
Last active September 13, 2022 01:37
AES-CBC application
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"os"
@zer0tonin
zer0tonin / main.go
Created June 22, 2019 19:26
AES-CBC exploit
package main
import (
"encoding/hex"
"fmt"
"os"
"github.com/gdamore/encoding"
)
@zer0tonin
zer0tonin / pokedex.json
Created July 28, 2019 13:12
pokemon stuff
{
"pikachu": {
"type": "electric",
"abilities": ["static", "lightning rod"]
},
"eevee": {
"type": "normal",
"abilities": ["run away", "adaptability", "anticipation"]
},
"grimer": {
@zer0tonin
zer0tonin / list_module
Created September 18, 2019 16:49
Pygithub stubbing
github.AuthenticatedUser
github.Authorization
github.AuthorizationApplication
github.Branch
github.BranchProtection
github.Clones
github.Commit
github.CommitCombinedStatus
github.CommitComment
github.CommitStats
@zer0tonin
zer0tonin / app.py
Created November 4, 2019 16:54
tartiflette-plugin-scalars example
import asyncio
from ipaddress import ip_address
from tartiflette import Resolver, create_engine
from aiohttp import web
from tartiflette_aiohttp import register_graphql_handlers
@Resolver("Query.ipAddress")
async def resolve_ip_address(parent, args, ctx, info):
@zer0tonin
zer0tonin / parser.py
Created December 5, 2019 16:46
Advent of Code day 5
def param_accessor(instruction, position):
try:
if instruction[-2 - position] == "1":
return lambda pointer, opcodes: opcodes[pointer+position]
except IndexError:
pass
return lambda pointer, opcodes: opcodes[opcodes[pointer+position]]
def op_sum(pointer, opcodes, first_param, second_param):
@zer0tonin
zer0tonin / orbit.py
Created December 6, 2019 17:49
Advent of Code day 6
class Node:
def __init__(self, value):
self.value = value
self.adjacent = []
def is_santa(self):
return self.value == "SAN"
def is_you(self):
return self.value == "YOU"