Skip to content

Instantly share code, notes, and snippets.

@otwm
otwm / wm_concat_define
Created March 29, 2016 01:58
wm_concat 함수 재정의
CREATE OR REPLACE TYPE t_string_agg AS OBJECT
(
g_string VARCHAR2(32767),
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
#포트는 확인 할 것.
sudo docker run -d -p 80:80 --name svn-server krisdavison/svn-server:v2.0 /startup.sh
# 접속
sudo docker exec -it <container-name> bash
# 저장소 추가
svnadmin create myrepo
#사용자 추가
#find ./ -type d -exec mkdir -p [[대상폴더]]/{} \;
#ex
find ./ -type d -exec mkdir -p ~/temp2/dst/{} \;
@otwm
otwm / cadvisor
Created September 29, 2016 06:14
docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
# MariaDB database server configuration file.
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
ifconfig <interface name> <ip> netmask <netmask> broadcast <broadcast>
sudo vi /etc/network/interfaces
auto enp5s0
iface enp5s0 inet static
address 192.168.0.104
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
@otwm
otwm / mount
Created October 24, 2016 05:00
sudo vim /etc/fstab
//192.168.0.105/data /mnt/data cifs user=admin,pass=rebel9,rw 0
@otwm
otwm / DatabaseConfig.java
Last active April 13, 2018 16:30
entityManager, jpa query factory expose
package kr.co.rebel9;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
# (전체)보안 업그레이드
sudo apt-get full-upgrade
# 고정 ip 할당
sudo vim /etc/network/interfaces
==================================================
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
for file in *.JPG
do
mv -v "$file" "${file%.JPG}.jpg"
done