Skip to content

Instantly share code, notes, and snippets.

View marantz's full-sized avatar

DongHan Kim marantz

  • Polaris AI
  • South Korea, Seoul
  • 16:29 (UTC -12:00)
  • X @zaaik
View GitHub Profile
@marantz
marantz / Pyenv install version
Created July 5, 2019 23:25
Mac OS X peen install Python Version
env PYTHON_CONFIGURE_OPTS="--enable-framework" \
env CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" \
pyenv install 3.7.2
@marantz
marantz / TestMain.java
Created December 14, 2018 03:59
Tomcat 8.5 RemoteAddrValve RegExp IP Addresses
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class TestMain {
/* ${catalina.base}/conf/Catalina/${hostname}/manager.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.base}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^127\.0\.0\.1$|^192\.168\.0\.7$|^(192)\.(168)\.(\d{1,3})\.(\d{1,3})$" />
</Context>
------------------------------------------------------------
-- TOMCAT 8.5
------------------------------------------------------------
-- JNDI Access Context Name
java:comp/env/jdbc/[JNDI_NAME]
-- server.xml
<GlobalNamingResources>
<Resource auth="Container"
name="jdbc/[JNDI_NAME]"
mongos> sh.status()
--- Sharding Status ---
sharding version: {
"_id" : 1,
"minCompatibleVersion" : 5,
"currentVersion" : 6,
"clusterId" : ObjectId("5c00b9622d7a02e715896479")
}
shards:
{ "_id" : "shard0000", "host" : "db03:27118", "state" : 1 }
@marantz
marantz / pipUpgrade.py
Last active October 1, 2018 10:16
pipUpgrade
import pkg_resources
from subprocess import call
packages = [dist.project_name for dist in pkg_resources.working_set]
call("pip install --upgrade " + ' '.join(packages), shell=True)
let g:chromatica#libclang_path = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib'
@marantz
marantz / sqlldr.ctl
Created June 13, 2018 08:35
Sqlldr control file sample
OPTIONS (
ROWS=1000,
BINDSIZE=5242880,
READSIZE=5242880
)
load data
append
into table DPVMO.PTB_AIS_DYNAMIC
fields terminated by ","
(MMSI_NO
# ^[^aeiouAEIOU][aeiouAEIOU]ll$
Balldoom
Belldoom
Billdoom
Bolldoom
Bulldoom
Calldoom
Celldoom
Cilldoom
Colldoom
@marantz
marantz / logstash.conf
Created April 30, 2018 09:39
logstash.conf
input {
file {
type => "tomcat"
path => [ "/tomcat/logs/catalina.out" ]
codec => multiline {
pattern => "(^\s*)"
negate => true
what => "previous"
}
}
# sqlnet.ora Network Configuration File: D:\oracle\product\12.2.0\dbhome_2\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)