Skip to content

Instantly share code, notes, and snippets.

View gyulkkajo's full-sized avatar
😝
Focusing

Changhee Han gyulkkajo

😝
Focusing
  • Seoul, Korea
View GitHub Profile
@gyulkkajo
gyulkkajo / aircon.csv
Last active December 1, 2017 05:40
Tensorflow lecture
#temp humid on:1,off:0
29 80 1
24 90 1
29 40 0
32 10 1
36 70 1
33 20 1
15 40 0
24 70 0
23 40 0
@gyulkkajo
gyulkkajo / argparse_example.py
Created December 12, 2017 06:06
Python argparse module example and preset.
import argparse
if __name__ == '__main__':
desc = '''
An example of how to use argparse
./CMD SUBCOMMAND [options...]
SUB COMMANDS:
record
@gyulkkajo
gyulkkajo / filesz.c
Created January 29, 2018 08:06
Short script to query a size of a file by open and seek.
#define _GNU_SOURCE // Needed to use O_LARGEFILE and lseek64
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@gyulkkajo
gyulkkajo / Makefile
Created March 21, 2018 08:37
Template of Makefile. It may be used for a simple c, c++ project.
.SUFFIXES : .c .o
CC = gcc
CFLAGS = -g $(INC)
INC = # -i -I
LIBS = # -l -L
DEPS = # *.h
OBJS = # *.o
TARGET =
@gyulkkajo
gyulkkajo / c_cpp_properties.json
Last active March 31, 2024 08:42
IntelliSense config file for Linux kernel X86_64.
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}",
"LINUX_PATH/include",
"LINUX_PATH/include/uapi",
"LINUX_PATH/include/generated",
"LINUX_PATH/arch/x86/include",
@gyulkkajo
gyulkkajo / cVimrc
Last active June 6, 2018 14:34
cVim for chrome
# Own settings for cVim of chrome browser
set smoothscroll
@gyulkkajo
gyulkkajo / parse-ext-csd.py
Created July 3, 2018 00:27 — forked from kylemanna/parse-ext-csd.py
Parse eMMC Extended CSD and print useful things.
#!/usr/bin/env python
"""
Author: Kyle Manna <[email protected]>
Blog: https://blog.kylemanna.com
cat /d/mmc0/mmc0:0001/ext_csd
0000000000000001030100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000087a0000000000000000061502030700100608010101080800100000728000000808080808080000000000010200070002000500000000000001000200000000000000000000000000000100050000000000030001ca00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
@gyulkkajo
gyulkkajo / .clang-format
Created July 23, 2018 06:40
vscode workspace setting for linux kernel and modules
---
BasedOnStyle: LLVM
Language: Cpp
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Linux
AlwaysBreakBeforeMultilineStrings: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
@gyulkkajo
gyulkkajo / mtrace_helper.c
Created April 21, 2020 06:46
mtrace helper : Start/Stop mtrace to debug memory leak or to check memory usage by signal
#include <stdio.h>
#include <signal.h>
#include <mcheck.h>
#include <stdlib.h>
/*
* mtrace Helper
*
* Usage : Compile with this binary
*
@gyulkkajo
gyulkkajo / Dockerfile
Created May 6, 2020 01:19
Docker: Local build environment for Ubuntu 16.04
FROM ubuntu:16.04
MAINTAINER [email protected]
RUN apt-get -y update
RUN apt-get -y install python3 bzip2 g++-multilib gcc-multilib gzip tar wget bison build-essential chrpath diffstat gawk git language-pack-en libglib2.0 python2.7 python3 python3-jinja2 python-minimal texi2html texinfo time tig bc libxml2-utils unzip zip libssl-dev vim tree
ARG user
ARG uid
RUN useradd -s /bin/bash $user -u $uid
USER $user