Skip to content

Instantly share code, notes, and snippets.

View fabon-f's full-sized avatar

fabon fabon-f

View GitHub Profile
@fabon-f
fabon-f / flag.txt
Created April 18, 2023 07:11
TSG decathlon CTF 2023 "Hash of Flag"
TSGCTF{d0n'7_cry_0v3r_h45h3d_f14g}
@fabon-f
fabon-f / text.md
Created October 27, 2022 22:33
Замятин - Мы
@fabon-f
fabon-f / main.rb
Created July 19, 2020 00:51
情報の課題
def parse(code)
program, data = code.split(/\n{2,}/)
data ||= ""
program = program.split("\n").map do |r|
op, operand = r.split(/\s+/)
[op, operand.to_i]
end
data = data.split.map(&:to_i)
@fabon-f
fabon-f / sslist.cr
Last active May 22, 2020 10:27
sslist.cr
# Singly-linked list
class ODS::SLList(T)
getter size : Int32
@head : Node(T)?
@tail : Node(T)?
def initialize
@size = 0;
@head = @tail = nil
@fabon-f
fabon-f / app.js
Last active August 27, 2023 14:23
Koa(1.x)のmiddlewareの仕組みを調べた ref: https://qiita.com/fabon/items/3fe94f8045151ffedc9e
app.use(function*(next) {
// next is generator
// do something
yield next; // nextを処理する(後ろのmiddlewareを先に処理する)
// do something
});
@fabon-f
fabon-f / app.ts
Last active September 6, 2022 07:53
Electronの型定義ファイルのエラーを荒業でなんとかする ref: https://qiita.com/fabon/items/474c80e5218ea0b4c8f7
/// <reference path="../typings/main.d.ts"/>
import ipc = require("ipc-main");
// あるいは
import * as ipc from "ipc-main";
var http = require('http');
var url = require('url');
var path = require('path');
var fs = require('fs');
var types = {
'html': 'text/html',
'js': 'text/javascript',
'css': 'text/css',
'png': 'image/png',
'svg': 'image/svg+xml',