Skip to content

Instantly share code, notes, and snippets.

lethee lethee

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am lethee on github.
  • I am lethee (https://keybase.io/lethee) on keybase.
  • I have a public key ASAJCcY491ZtKGxPFGsxpXhVjYx1wQ1SnGcFu7k0TPFD8go

To claim this, I am signing this object:

@lethee
lethee / pkg-config-guide.md
Last active Jan 18, 2020
Guide to pkg-config 한글 번역
View pkg-config-guide.md
@lethee
lethee / example.py
Last active Oct 16, 2017
caffe2 pertained data example
View example.py
CAFFE2_ROOT = "/caffe2"
CAFFE_MODELS = "/usr/local/caffe2/python/models"
import numpy as np
import skimage.io
import skimage.transform
import os
from caffe2.proto import caffe2_pb2
from caffe2.python import core, workspace
View Main.java
package com.lethee;
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
@lethee
lethee / deleter.cpp
Created May 2, 2016
C++11 shared_ptr, unique_ptr, and deleter
View deleter.cpp
#include <memory>
#include <cstdio>
using namespace std;
int myfclose(FILE* stream)
{
printf("%s\n", __func__);
return fclose(stream);
}
@lethee
lethee / main.cpp
Created Apr 4, 2016
glib main roop, boot coroutine, blocking loop
View main.cpp
// g++ -std=c++11 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include main.cpp -lglib-2.0 -lboost_system -lboost_coroutine -lboost_context -o test
//
#include <iostream>
#include <thread>
#include <chrono>
#include <glib.h>
#include <boost/coroutine/all.hpp>
using namespace std;
@lethee
lethee / env.py
Created Mar 21, 2016
Sublime Text 3: Apply NVM environment
View env.py
# Save this file
# mac - "~/Library/Application Support/Sublime Text 3/Packages/"
# linux - "~/.config/sublime-text-3/Packages/"
# NOTE!
# ~/.nvm/alias/default must contain full version name.
# $ nvm alias default v4.3.5
import os
@lethee
lethee / get.cpp
Created Feb 15, 2016
ipv4 ipv6 getaddrinfo instead of gethostbyname
View get.cpp
// g++ -Wall -o get get.cpp && ./get ::ffff:192.168.111.8 3000
// g++ -Wall -o get get.cpp && ./get 192.168.111.8 3000
// g++ -Wall -o get get.cpp && ./get www.google.com 80
#include <iostream>
#include <cstdlib>
#include <sys/socket.h>
#include <netdb.h>
#include <cstring>
#include <arpa/inet.h>
@lethee
lethee / time_server.py
Created Nov 9, 2015
Python UTC current Time in milleseconds with non-block TCP Server
View time_server.py
import socket
import select
import datetime
port = 20001
def main():
serversock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
serversock.setblocking(0)
@lethee
lethee / Dockerfile
Last active Sep 23, 2015
progit2-ko-build-docker
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Seonghwan Lee <lethee@gmail.com>
RUN cd /etc/apt && \
sed -i 's/archive.ubuntu.com/kr.archive.ubuntu.com/g' sources.list
RUN apt-get update
RUN apt-get install -y git curl python
RUN apt-get install -y ruby2.0 ruby2.0-dev
You can’t perform that action at this time.