Skip to content

Instantly share code, notes, and snippets.

View zelon's full-sized avatar

KIM, JINWOOK zelon

View GitHub Profile
@zelon
zelon / Using TaskCompletionSource
Created September 27, 2025 13:08
C# 의 TaskCompletionSource 사용하기
using System.Threading;
public class Program
{
public static System.Collections.Concurrent.ConcurrentQueue<Job> jobQueue = new();
public static Task Main(string[] args)
{
var thread = new Thread(new System.Threading.ThreadStart(RunAsync));
thread.Name = "RunAsyncThread";
@zelon
zelon / test_protobuf3.cs
Created March 8, 2019 14:35
Test protobuf3 with CSharp about Calculating size with optionaled data
using System;
namespace TestCSharp2017
{
class Program
{
// test.proto
/*
syntax = "proto3";
@zelon
zelon / tasks.json
Created August 13, 2018 14:06
Put tasks.json and use Run task in visual studio code
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "p4checkout",
"type": "shell",
"command": "p4 edit ${file}",
"problemMatcher": []
@zelon
zelon / MultiIOReadTest.cpp
Created April 30, 2017 14:50
여러 파일을 읽을 때 single thread에서 읽는 시간과 multi thread에서 읽는 시간 비교를 위한 코드. 테스트 결과는 multi thread가 더 빠르다
#include <stdio.h>
#include <tchar.h>
#include <atomic>
#include <chrono>
#include <experimental/filesystem>
#include <fstream>
#include <iostream>
#include <thread>
#include <vector>
@zelon
zelon / melon.go
Created July 8, 2015 15:02
멜론 api 를 이용해서 일간 순위 얻어오기. Go 로 http request 하면서 header 추가하기. Http request with header using golang
package main
import "fmt"
import "net/http"
import "io/ioutil"
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "http://apis.skplanetx.com/melon/charts/todaytopsongs?count=100&page=1&version=1", nil)
import os
import subprocess
import sys
import thread
import time
class TimeoutCheckLauncher:
def __init__(self, filename, timeout_seconds, timeout_func, process_output_func):
self.filename = filename
self.timeout_seconds = timeout_seconds