This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # tomcat | |
| # | |
| # chkconfig: 345 96 30 | |
| # description: Start up the Tomcat servlet engine. | |
| # | |
| # processname: java | |
| # pidfile: /var/run/tomcat.pid | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 현상 : 로그에 The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path 찍힘. | |
| 해결 : tomcat native library 설치 | |
| http://tomcat.apache.org/tomcat-7.0-doc/apr.html 참고 | |
| 1 Apache APR(Apache Portable Runtime) 설치 | |
| Apache APR 홈페이지 : http://apr.apache.org/ | |
| APR은 Apache2 버전이 설치되면 함께 설치 된다. $APACHE_HOME/bin/apr-1-config 를 확인 한다. | |
| Apache 2 가 설치되어 있지 않다면 아래와 같이 설치해야 한다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var exec = require('child_process'), | |
| mysql = require('mysql'), | |
| fs = require('fs'), | |
| readline = require('readline') | |
| stream = require('stream'), | |
| AWS = require('aws-sdk'), | |
| domain = require('domain'), | |
| crypto = require('crypto') | |
| var env = require('./env.json') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var exec = require('child_process'), | |
| fs = require('fs'), | |
| readline = require('readline') | |
| stream = require('stream'), | |
| AWS = require('aws-sdk'), | |
| domain = require('domain'), | |
| crypto = require('crypto') | |
| var env = require('./env.json') | |
| var instream = fs.createReadStream(env.query_result_filename); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mysql = require('mysql'); | |
| var fs = require('fs'); | |
| var properties = require('./db-properties.json'); | |
| var env = require('./env.json'); | |
| var connection = mysql.createConnection(properties); | |
| var filename = env.query_result_filename; | |
| var surveyIds = []; | |
| connection.query("use database"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #https://gist.github.com/rajraj/1556657 | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # for mac, remove comment. | |
| #export LC_CTYPE=C | |
| #export LANG=C | |
| find . -type f -exec sed -i '' 's/SRC/DST/g' {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/env/python | |
| # coding: utf8 | |
| import urllib | |
| import urllib2 | |
| import requests | |
| from datetime import date, datetime | |
| ## urllib는 파일 만들고 다운로드 + write 시작 | |
| ## urllib2 다운로드 받은 후에 파일 write 시작 | |
| url = 'http://www.poombuy.com/sk_styletag/sk_stt_all.xml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Cynap { | |
| private static final int BASE = 26; | |
| public static void main(String[] args) { | |
| if (args.length < 1) { | |
| System.out.println("please insert value... "); | |
| return; | |
| } | |
| System.out.println("input: " + args[0]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CreditCardValidation { | |
| public static void main (String[] args) { | |
| if (args.length < 1) { | |
| System.out.println("usage: CreditCardValidation number"); | |
| } else { | |
| String cardNumber = args[0]; | |
| int checksum = 0; | |
| int length = cardNumber.length(); | |
| for (int i = 0; i < length; i++) { |