Skip to content

Instantly share code, notes, and snippets.

View n4o847's full-sized avatar
💭
hey hey it's like like popcorn

Yuya Miura n4o847

💭
hey hey it's like like popcorn
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n4o847
n4o847 / settings.json
Created August 19, 2020 08:45
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.1.2021.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@n4o847
n4o847 / hypertorus.rb
Created May 7, 2020 06:14
第6回東大京大コードゴルフ大会
def search(size)
dir = 1
mem = {}
pos = 0
id = 0
mem[0] = 0
id += 1
loop do
@n4o847
n4o847 / hanoi.rb
Created May 7, 2020 05:48
第6回東大京大コードゴルフ大会
class Hanoi
STACK = { :A => 0, :B => 1, :C => 2 }
BYTES = { :u8 => 0, :u16 => 1, :u32 => 2, :u64 => 3 }
def pair(x, y)
a, b = STACK[x], STACK[y]
raise "" if a == b
b -= 1 if a < b
[a, b]
end
git config --local user.name n4o847
git config --local user.email 22975590+n4o847@users.noreply.github.com
,+[-
>++++++[-<-------->]
a 10
0 9 a a
a 9 a 0
a 0 r 0
+++++++++[-<[->>+>+<<<]>>>[-<<<+>>>]<<]
>[-<<+>>]<
,
push 0
loop:
push 0 readi
push 0 retrieve
dup push 10 sub jz yes:
dup push 12 sub jz yes:
dup push 14 sub jz yes:
dup push 15 sub jz yes:
dup push 16 sub jz yes:
dup push 18 sub jz yes:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
#disp {
@n4o847
n4o847 / seccon2019-coffee_break.py
Created October 20, 2019 06:56
SECCON 2019 QUALS
from Crypto.Cipher import AES
import base64
def encrypt(text):
key = "SECCON"
s = ''
for i in range(len(text)):
s += chr((((ord(text[i]) - 0x20) + (ord(key[i % len(key)]) - 0x20)) % (0x7e - 0x20 + 1)) + 0x20)
return s
class Hanoi
STACK = { :A => 0, :B => 1, :C => 2 }
BYTES = { :u8 => 0, :u16 => 1, :u32 => 2, :u64 => 3 }
def pair(x, y)
a, b = STACK[x], STACK[y]
raise "" if a == b
b -= 1 if a < b
[a, b]
end