Skip to content

Instantly share code, notes, and snippets.

View kujyp's full-sized avatar

kujyp kujyp

View GitHub Profile
#이번에 제 centos7용 docker-ce, nvidia-docker install script가 갑자기 깨져서, 확인중입니다.
#내용은 스크린샷처럼 docker-ce와 nvidia-docker2 2.0.3의 dependency관계 때문에 문제가 생겼습니다.
#에러는 yum install -y nvidia-docker2 수행중 발생하고, 에러내용은 스크린샷으로 올렸습니다.
#제 스크립트 중 설치하는부분만 빼서 보면 아래 내용인데요.
sudo bash -e <<EOF
yum-config-manager \
--add-repo \
#!/bin/bash
function ensure_privileged_or_exit()
{
local cap_lst=$(capsh --decode=00000007ffffffff | cut -d "=" -f2 | tr ',' ' ')
for curr_cap in $(capsh --print | grep Current: | cut -d "=" -f2 | tr ',' ' '); do
cap_lst=$(echo "$cap_lst" | sed -e "s/$curr_cap//g")
done
cap_lst=$(echo "$cap_lst" | sed -e "s/ //g")
@kujyp
kujyp / codespitz_week05.html
Last active December 12, 2018 01:01
codespitz_week05.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style>
.urgent{color:red}
.high{color:orange}
.normal{color:skyblue}
@kujyp
kujyp / codespitz_week03.html
Created November 27, 2018 16:00
codespitz_week03
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<img id="a">
<section id="b"></section>
<br/>
@kujyp
kujyp / codespitz_week03.html
Created November 27, 2018 16:00
codespitz_week03
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<img id="a">
<section id="b"></section>
<br/>
@kujyp
kujyp / Github.js
Last active November 20, 2018 18:35
const Github = class {
constructor(id, repo) {
this._base = `https://api.github.com/repos/${id}/${repo}/contents/`;
}
load(path) {
return new Promise((res, rej) => {
const id = 'callback' + Github._id++;
const f = Github[id] = ({data: { content }}) => {
delete Github[id];
@kujyp
kujyp / python_shebangline_test_executable_app.py
Last active November 16, 2018 06:46
python shebang line test
#!/usr/bin/python
import sys
print("sys.version==[{}]".format(sys.version))
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<section id="data"></section>
</body>
<script>
@kujyp
kujyp / Docker_Cheetsheets.sh
Created October 31, 2018 10:03
Docker Cheetsheets
#### Docker
docker build -t tfn2mt_base -f tfn2mt/Dockerfile.cpu . && docker run --runtime=nvidia -it --rm tfn2mt_base
@kujyp
kujyp / cpp_logger.h
Last active October 22, 2018 01:39
C++ logger using cout
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define LOG_WARN_JYP(str) \
if (WARN <= g_logLevel) { \
LOG_JYP(str) \
};
#define LOG_DEBUG_JYP(str) \
if (DEBUG <= g_logLevel) { \
LOG_JYP(str) \