Skip to content

Instantly share code, notes, and snippets.

View sunghun7511's full-sized avatar

SHGroup sunghun7511

View GitHub Profile
@sunghun7511
sunghun7511 / authorizer.py
Created June 26, 2023 18:41
Imagin Games - API Gateway authorizer lambda source code
import os
import jwt
def decode_authorization_header(identity_source: list) -> dict:
try:
token = identity_source[0].split(" ")[1]
key = os.environ.get("JWT_TOKEN")
result = jwt.decode(token, key, algorithms="HS256")
@sunghun7511
sunghun7511 / SubAnnounceAdd.java
Last active April 17, 2020 08:40
AnnouncePlus 커맨드 구조 예시
package chsui.AnnouncePlus.Commands;
import java.util.List;
import org.bukkit.command.CommandSender;
import chsui.AnnouncePlus.Controller.SubCommand;
public class SubAnnounceAdd extends SubCommand {
@sunghun7511
sunghun7511 / raspberry.py
Last active November 3, 2018 14:00
raspberry solve
#!/usr/bin/python
import hashlib
import sys
def printFlag():
print("Flag is XXX")
def rshift(val, n):
m = 1 << 128
chrs = "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
def get(ind):
output = ""
for i in ind:
output += chrs[i]
return output
print(get([36, 76, 60, 17, 69, 66, 62, 65, 60, 74, 62, 72, 66, 60, 54, 76, 82, 47, 60, 33, 62, 54, 59, 59, 53]))
package main
import (
"fmt"
)
func up(a int) int {
if a >= 10 {
return a / 10
} else {