Skip to content

Instantly share code, notes, and snippets.

Alice GIRARD zer0tonin

Block or report user

Report or block zer0tonin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zer0tonin
zer0tonin / main.go
Created Feb 18, 2020
Dumb mutex stuff
View main.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
)
@zer0tonin
zer0tonin / orbit.py
Created Dec 6, 2019
Advent of Code day 6
View orbit.py
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"
@zer0tonin
zer0tonin / parser.py
Created Dec 5, 2019
Advent of Code day 5
View parser.py
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 / app.py
Created Nov 4, 2019
tartiflette-plugin-scalars example
View app.py
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 / list_module
Created Sep 18, 2019
Pygithub stubbing
View list_module
github.AuthenticatedUser
github.Authorization
github.AuthorizationApplication
github.Branch
github.BranchProtection
github.Clones
github.Commit
github.CommitCombinedStatus
github.CommitComment
github.CommitStats
View pokedex.json
{
"pikachu": {
"type": "electric",
"abilities": ["static", "lightning rod"]
},
"eevee": {
"type": "normal",
"abilities": ["run away", "adaptability", "anticipation"]
},
"grimer": {
@zer0tonin
zer0tonin / main.go
Created Jun 22, 2019
AES-CBC exploit
View main.go
package main
import (
"encoding/hex"
"fmt"
"os"
"github.com/gdamore/encoding"
)
@zer0tonin
zer0tonin / main.go
Last active Jun 22, 2019
AES-CBC application
View main.go
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"os"
View account.feature
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 Oct 15, 2019
NeoVim config for python and JS
View init.vim
" Requirements :
" plug.vim
" pip install jedi
" pip3 install neovim
" npm install -g eslint
" npm install -g tern
" pip3 install pylint
" Post-setup
" :PlugInstall
" :UpdateRemotePlugins
You can’t perform that action at this time.