Skip to content

Instantly share code, notes, and snippets.

View jdabtieu's full-sized avatar

Jonathan Wu jdabtieu

View GitHub Profile
jdabtieu / template.asm
Last active February 3, 2024 19:39
64-bit Assembly Competitive Programming template with fast IO (minified version)
section .text
global _start
; int readint()
; byte _read_buf()
; void printint(int num) --> edi
; void newline()
; void printspace()
; void _write_buf(char *buf, int count) --> rdi, esi * max of BUF_SIZE characters (default 65536) at once

SimpleFileServer - idekCTF 2022


All I wanted was a website letting me host files anonymously for free, for ever



jdabtieu /
Last active January 23, 2023 21:42
Java Competitive Programming template with fast IO
import java.util.*;
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(;
static StringTokenizer in;
public static void main(String[] args) throws IOException {

Engraver - Google CTF 2022


You can see pictures of a robot arm laser engraver attached. Can you figure out what it is engraving?

Note: the flag should be entered all in upper case. It contains underscores but does not contain dashes.

jdabtieu /
Last active March 28, 2022 03:33
Enables colors in the Windows terminal for Java console programs. Read the comment before blindly copy pasting!
import java.lang.reflect.InvocationTargetException;
public class Main {
static void enableColor() {
try {
// Load classes
jdabtieu / fastio.cpp
Last active August 8, 2021 02:20
C++ Fast IO (read & print signed & unsigned ints)
// IMPORTANT: Call Write(); at the end of your main function to flush the output buffer
#include <bits/stdc++.h>
#include <unistd.h>
#pragma GCC optimize ("Ofast")
int oPtr = 0;
#ifdef WIN64
char sc() {return getchar();}
void pc(char c) {putchar(c);}
jdabtieu /
Last active July 18, 2021 18:37
Java Fast IO (even faster than BufferedReader). Key differences: no thread safety, doesn't ensure that the input stream is still open, does not create unncessary objects
public class IO {
static InputStreamReader br = new InputStreamReader(;
static char[] ibuf = new char[65536];
static int iptr = 0;
static int imax = 0;
static int readInt() throws IOException {
int x = 0;