Skip to content

Instantly share code, notes, and snippets.

View cybertramp's full-sized avatar
⌨️
work hard play hard!

cybertramp cybertramp

⌨️
work hard play hard!
View GitHub Profile
@cybertramp
cybertramp / run_docker-dokuwiki.sh
Created September 10, 2019 10:26
docker-dokuwiki runnning script
#!/bin/bash
#================
# Script on [email protected]
#
# Updated on: 19.09.10
#================
# ref: https://github.com/bitnami/bitnami-docker-dokuwiki
# I'm tested in GCP and now running.
@cybertramp
cybertramp / hugo_onepass_run.sh
Last active September 17, 2019 08:16
This script append the date in file name. The date is automatically added to the file name of the created post file.
#! /bin/bash
# =============================
#
# Hugo fast write script
#
# Created 19.09.17([email protected])
#
# =============================
#
@cybertramp
cybertramp / check_tensorflow.py
Last active October 7, 2019 02:56
ipython tensorflow2 version check script
# Tensorflow version check & upgrade
# Written by [email protected]
# Updated 19.09.23
%%bash
var=`python3 -c 'import tensorflow as tf; print(tf.__version__)'`
if [ "${var:0:1}" = "2" ];then
echo "version2"
else
echo "version1"
@cybertramp
cybertramp / commit.sh
Created September 23, 2019 05:46
write hugo post script and commit script
#! /bin/bash
# =============================
#
# Hugo fast commit script
#
# Created 19.09.23([email protected])
#
# =============================
@cybertramp
cybertramp / opencv_compile_command.log
Created September 25, 2019 15:31
Compile command when using opencv.
# Compile
g++ -I/usr/local/include/opencv4 -O0 -g3 -Wall -c -fmessage-length=0 -no-pie -v -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
# Linking
g++ -L/usr/local/lib -o "opencv_homework1" ./main.o -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_highgui -lopencv_ml -lopencv_videoio -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_flann
@cybertramp
cybertramp / .vimrc
Created November 13, 2019 14:52
my vimrc file
" This file for [email protected] 's vimrc setting file
" Last updated 19.11.13
if has("syntax")
syntax on
endif
set autoindent " auto indent
set cindent " for c language indent
set nu " linenumber
@cybertramp
cybertramp / RGB_to_HSV.c
Created December 16, 2019 18:24
RGB_to_HSV C code
// r, g, b 값은 0 ~ 1 사이
// h = [0,360], s = [0,1], v = [0,1]
// if s == 0, then h = -1 (undefined)
void RGBtoHSV( float r, float g, float b, float *h, float *s, float *v )
{
float min, max, delta;
min = MIN( r, g, b );
max = MAX( r, g, b );
*v = max; // v
delta = max - min;
@cybertramp
cybertramp / mail_bot.py
Created December 18, 2019 16:06
Python3 mail bot
# You need python3
# Python mail bot
# 2017 - [email protected]
import smtplib
def prompt(prompt):
return input(prompt).strip()
fromaddr = '보내는이 주소'
@cybertramp
cybertramp / clear_torents.sh
Created January 12, 2020 14:45
transmission-rpc torrent list auto cleaner.
#!/usr/bin/env bash
######################################################
#
# transmission finished torrent clear script.
#
# 20.01.12 [email protected]
######################################################
#
# 포트 => 기본 포트는 9091이며, 따로 지정한 경우는 입력
# 아이디 => rpc 접속 아이디 입력
@cybertramp
cybertramp / .bashrc
Last active February 13, 2020 01:24
bashrc file for me
# 맨 아래 붙여 넣을것.
# Paste to bottom.
export PS1="[`hostname`]\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ "