반응형
SSLCertificateFile           xxx-crt.pem
SSLCertificateKeyFile      xxx-key.pem
SSLCertificateChainFile   xxx-chain.pem
SSLCACertificateFile       xxx-chain-only.pem

pem 파일로 생성 후 아파치에 설정할 때

 

반응형
반응형

현재 로그인한 계정의 홈폴더 (~)에 ".vimrc" 파일 생성 후 아래 내용 저장

set fileencodings=utf-8,euc-kr
set encoding=utf-8
반응형

'develop > linux' 카테고리의 다른 글

vi euc-kr, utf-8  (0) 2019.12.24
TTFB 체크 명령어  (0) 2016.02.16
GNU C, __attribute__  (0) 2014.10.14
Linux C에서 키보드 이벤트 받기(kbhit())  (0) 2014.02.28
NAT 종류별 설정  (0) 2014.02.17
반응형
{아파치 프로세스명} -V

apache2 -V
혹은
httpd -V

실행 결과

 

Config variable ${APACHE_LOG_DIR} is not defined 오류 발생하는 경우: 아파치 실행파일을 직접 실행 시 발생. 아래와 같은 명령어를 순차적으로 실행해준다.

source {아파치 설정파일 경로}/envvars
{아파치 프로세스명} -V

source /etc/apache2/envvars
apache2 -V
반응형

'develop > web' 카테고리의 다른 글

.htaccess를 활용한 https 이동  (0) 2023.08.30
반응형

2023년 8월 31일부터 플레이 스토어에 등록하기 위해서는 앱의 Target API를 33이상으로 해야 한다.

Android 13에 맞춰서 사용하던 권한을 변경했는데, Album에서 권한이 허용되지 않았다고 얼럿이 뜬다.
yanzhenjie:album는 최종 업데이트가 2018년이고, 내부적으로 권한을 체크해서 얼럿을 띄우는데, 한 개발자가 Android 13에 맞춰서 업데이트를 해놨다(Thanks)

라이브러리 참조방법
https://jitpack.io/#hisetu/Album/android_13-SNAPSHOT

 

JitPack | Publish JVM and Android libraries

JitPack makes it easy to release your Java or Android library. Publish straight from GitHub or Bitbucket.

jitpack.io

깃헙주소
https://github.com/hisetu/Album 

 

GitHub - hisetu/Album: :watermelon: Album and Gallery for Android platform.

:watermelon: Album and Gallery for Android platform. - GitHub - hisetu/Album: :watermelon: Album and Gallery for Android platform.

github.com

 

반응형
반응형

- 웹 ROOT 폴더에 저장
- 서브도메인은 제외하고 싶은경우 주석해제

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        RewriteCond %{HTTPS} off
#       RewriteCond %{HTTP_HOST} !^(sub1\.mydomain\.com|sub2\.mydomain\.com)
        RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
반응형

'develop > web' 카테고리의 다른 글

Apache prefork, worker 모듈 확인  (0) 2023.10.21
반응형

참조: https://github.com/java-decompiler/jd-gui/issues/196

 

JD-GUI crash on start up w/ Mac High Sierra? · Issue #196 · java-decompiler/jd-gui

Hey. I've been using JD-GUI for some time now and I just recently updated my computer to High Sierra and now it crashes whenever I start it. Can anyone help, please?

github.com

 

아래 2가지 방법중 하나 사용

See issue #187 for the fix. This works on Java 9 and 10.
I fixed my Mac launcher by going into the JD-GUI.app/Contents/MacOS folder and updating the Java call in the .sh file as follows (the two --add-opens lines):
exec "$JAVACMD"
-cp "${JVMClassPath}"
-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}"
-Xdock:name="${CFBundleName}"
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
${JVMOptions:+$JVMOptions }
${JVMDefaultOptions:+$JVMDefaultOptions }
${JVMMainClass}
${JVMArguments:+ $JVMArguments}

 

OK so I solved this by specifying the version to run inside of the Info.plist file.
To access that right click on the OSx JD-GUI icon and go to "Show Package Contents" then navigate into the "Contents" directory and open "Info.plist" inside of a text editor.

You want to look for the line that looks like:

<key>JVMVersion</key> <string>1.7+</string>

I believe the issue I was experiencing was caused by having Java 10 installed so the real issue may be that High Sierra is OK but Java 10 causes problems. To fix that I specified the Java 7 runtime in the Info.plist file by changing the above line to the following:

<key>JVMVersion</key> <string>1.7</string>

This allows me to run the JD-Gui from the osx .app wrapper as I did before my update.
반응형
반응형

/Applications/Eclipse.app/Contents/Info.plist 파일 수정

<array>

<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options,

or add a VM found via $/usr/libexec/java_home -V

<string>-vm</string><string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string>

<string>-vm</string><string>/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java</string>

-->

<string>-keyring</string>

                         <string>~/.eclipse_keyring</string>

<!-- Java 설치 경로를 추가 -->

<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java</string>

<!-- 추가 -->

</array>



출처: https://sshbug.tistory.com/805 [SsonG's]

반응형

'develop > Mac OS' 카테고리의 다른 글

JD-GUI with java 8+  (0) 2021.06.07
터미널에 색상 넣기 및 프롬프트 변경  (0) 2017.06.20
Mac에서 숨김파일/폴더 표시  (0) 2017.03.23
mac os에서 wget 설치  (0) 2014.03.27
반응형

참조: https://6developer.com/935

object-c: https://indra17.tistory.com/entry/ios-%ED%83%88%EC%98%A5%ED%8F%B0-%EC%B2%B4%ED%81%AC?category=533814

func hasJailbreak() -> Bool {
        guard let cydiaUrlScheme = NSURL(string: "cydia://package/com.example.package") else { return false }
        if UIApplication.shared.canOpenURL(cydiaUrlScheme as URL) {
            return true
        }
        #if arch(i386) || arch(x86_64)
        return false
        #endif
        
        let fileManager = FileManager.default
        if fileManager.fileExists(atPath: "/Applications/Cydia.app") ||
            fileManager.fileExists(atPath: "/Library/MobileSubstrate/MobileSubstrate.dylib") ||
            fileManager.fileExists(atPath: "/bin/bash") ||
            fileManager.fileExists(atPath: "/usr/sbin/sshd") ||
            fileManager.fileExists(atPath: "/etc/apt") ||
            fileManager.fileExists(atPath: "/usr/bin/ssh") ||
            fileManager.fileExists(atPath: "/private/var/lib/apt") {
            return true
        }
        if canOpen(path: "/Applications/Cydia.app") ||
            canOpen(path: "/Library/MobileSubstrate/MobileSubstrate.dylib") ||
            canOpen(path: "/bin/bash") ||
            canOpen(path: "/usr/sbin/sshd") ||
            canOpen(path: "/etc/apt") ||
            canOpen(path: "/usr/bin/ssh") {
            return true
        }
        let path = "/private/" + NSUUID().uuidString
        do {
            try "anyString".write(toFile: path, atomically: true, encoding: String.Encoding.utf8)
            try fileManager.removeItem(atPath: path)
            return true
        } catch {
            return false
        }
    }
    func canOpen(path: String) -> Bool {
        let file = fopen(path, "r")
        guard file != nil else { return false }
        fclose(file)
        return true
    }
반응형

'develop > iOS' 카테고리의 다른 글

ios 탈옥폰 체크  (0) 2019.12.12
swift 타입체크 함수 (UIViewController)  (0) 2019.12.11
xcode에서 개발/운영 환경 설정  (0) 2019.03.28
swift에서 macro define 사용하기  (0) 2019.03.28
swift용 SQLite 클래스  (0) 2018.07.13
반응형

대화하는 대상보다 대화주체가 직급이 낮은경우 보통 이런식으로 말을한다. (둘 다 본인보다 직급이 높음)

과장님 김대리가 XX했습니다.
사장님 김이사가 XX했습니다.

이것은 잘못된 표현이다.
그러나 인터넷에 올라와 있는 많은 블로그 등에서 위의 표현이 맞다고 한다.(무려 나무위키에서도)

대화 상대방보다 직급이 낮은것이지, 본인보다 직급이 낮은것은 아닌데, 왜 반말을 하는 것일까?
이것은 압존법을 직장에서 쓰려고 하다가 생긴 부작용이다.

압존법은 사적인 관계에서 사용하는 존대법이다.

제대로 교육되지 않은 압존법과 일제감정기때 들어온 압존법(나무위키 참조)이 뒤섞여 위와같은 직장내 압존법이 생긴것으로 보인다.

 

제대로 된 표현은 다음과 같다.

과장님 김대리님이 XX했습니다.
사장님 김이사님이 XX했습니다.

 

존칭을 한다고 대화주체에 ~~께서를 붙이면 대화상대보다 대화주체를 더 높이는 것이 되므로 조심해야 한다.

과장님 김대리님께서 ~~~
과장님 김대리께서 ~~~

 

참조 (인터넷에서 잠시 검색해봤을때는 2011년이 최신버전이었다)

직장에서의 경어법에 대해서는 아래와 같은 ‘표준 언어 예절(2011, 국립국어원)’의 내용을 참고하실 수 있습니다. 아래의 ‘표준 언어 예절’에 따르면, “김 부장님, 박 과장님은 잠깐 외출하셨습니다.” 정도로 쓸 수 있겠습니다.

17. 직장, 사회에서
지칭 대상이 말하는 사람보다 상급자인 경우, 듣는 사람의 직위와 나이를 고려하여 ‘총무과장이’, ‘총무과장님이’, ‘총무과장께서’, ‘총무과장님께서’ 가운데 어떤 것을 써야 할이지 또 ‘하시었’이라고 할 것인지 ‘했’이라고 할 것인지를 결정하기 어렵다. 그러나 직장에서의 압존법은 우리의 전통 예절과는 거리가 멀다.
윗사람 앞에서 그 사람보다 낮은 윗사람을 낮추는 것이 가족 간이나 사제 간처럼 사적인 관계에서는 적용될 수도 있지만 직장에서 쓰는 것은 어색하다. 따라서 직장에서 윗사람을 그보다 윗사람에게 지칭하는 경우, ‘총무과장님께서’는 곤란하여도, ‘총무과장님이’라고 하고 주체를 높이는 ‘-시-’를 넣어 ‘총무과장님이 이 일을 하셨습니다.’처럼 높여 말하는 것이 언어 예절에 맞다.

반응형

'일상' 카테고리의 다른 글

아이폰 6s 로즈골드 64G 구매  (0) 2015.10.23
뉴투스카니 스펙  (0) 2012.11.09
웃음따위...  (0) 2010.04.14
반응형

출처:http://egloos.zum.com/indirock/v/3791689

[vi 에디터 utf8 <-> euc-kr 웹문서 encoding 전환하기]
원문: (http://onlyu.blog.me/60123862837)

 

vi로 웹문서를 열어 보면 한글이 깨어져 있고

<meta http-equiv=Content-Type Content="text/html; charset=euc-kr">이 보인다면

리눅스 콘솔창에 env 해 볼때 LANG=ko_KR.UTF-8 으로 나온면 utf8 환경입니다.

 

Q) 그럼 한글이 깨어져 보이는 utf-8 시스템 환경에서 euc-kr 웹문서를 제대로 볼 수 없는 것인가?

A) 리눅스 환경이라면 vi 환경설정 파일인 .vimrc 파일 set fileencodings=utf8,euc-kr 를 추가하면 문서를 열때 자동적으로 fileencoding이 utf8인지 euc-kr 인지 encoding에 맞게 열고 저장을 합니다.

계정 로그아웃(재접속)하지 않고 vi 설정을 적용할려면 콘솔에서 source .vimrc 하고 엔터키를 누르면 됩니다.

 

Q) 그럼 euc-kr 파일 웹문서를 utf8 파일로 변경을 하고 싶다면 어떻게 하죠?

A) vi로 파일을 열고 나서

:set fileencoding=utf-8

:w

 

하면 됩니다. 저장 후 종료를 할려면 :wq 엔터를 하면 됩니다.

반대로 utf8 문서를 euc-kr로 변경 할려면 :set fileencoding=euc-kr을 하면 됩니다.

 

 

euc-kr 웹문서를 utf8로 변경 하고 저장 했다면

<meta http-equiv=Content-Type Content="text/html; charset=utf-8">

로 하지 않으면 웹브라우저에서 확인시에는 다시 한글이 깨어져 보이겠죠.

 

 

 

 

 

Q) vi 에디터로 열지 않고 euc-kr 웹문서를 utf8로 변경 할려고 합니다. 어떻게 해야 하죠?

 

A) iconv 명령어로 가능합니다.

 

iconv -f euc-kr -t utf-8 euc-kr.html --output utf8.html

 

or 

 

iconv -f euc-kr -t utf-8 euc-kr.html > utf8.html

 

 

 

Q)한개 파일이 아니라 여러개의 html 파일을 동시에 변경 할려면 어떻게 하죠?

 

백업 파일처럼 utf8.html로 할 필요없이 그냥 utf-8 파일로 변환 되면 좋겠는데요??

 

A)

 

변경을 원하는 경로로 이동을 하고 아래와 같은 명령어로 한방에 그럼 변경해 보겠습니다.

 

cd /web/files 

 

for I in ./-.html ; do iconv -c -f euc-kr -t utf-8 $I > $I.tmp && mv $I.tmp $I ; done

 

 

 

작업 완료 전에는 무조건 백업본을 유지하는 것이 좋습니다. 그냥 원본폴더를 tar로 묶어 두면 되죠. 

 

시스템 환경에 따라 작업 환경에 따라 charset encoding은 테스트 작업을 하고 본격적으로 진입 하는 것이 바람직합니다.  

 

 

 

Q) recode 명령어로 한번에 변경 할 수 있다고 하는데 어떻게 하나요?

 

A) 먼저 시스템에 recode 명령어를 사용할 수 있는지 확인 해야 하는데

 

rpm -qi recode 해서 아무것도 안나오면 설치 해야합니다.

 

yum install recode recode-devel 또는 rpm을 찾아서 설치 하거나 

 

http://recode.progiciels-bpi.ca/index.html 접속해서 파일을 받아서 설치합니다.

 

recode 명령어로 얼마나 많은 charset 변경을 할 수 있는지 확인은

 

recode -l 로 살펴 보면 됩니다. 그럼 euc-kr에서 utf-8로 변경 명령어는 아래와 같습니다.

 

 

 

recode -v <소스 CHARSET>...<변환 CHARSET> <파일명>

 

recode -v EUC-KR...UTF-8 *.html

 

 

 

 

 

Q) php에서 특정 문자열만 euc-kr 또는 utf8로 할려면 어떻게 하죠?

 

A) iconv 함수를 이용하면 됩니다.

 

iconv("euc-kr", "utf-8", $str); // euc-kr을 utf8로 encoding 됩니다.

 

iconv("utf-8", "euc-kr", $str); // utf8을 euc-kr로 encoding 됩니다.

 

참조 URL : http://www.php.net/manual/en/function.iconv.php

 

 

 

 

 

Q) java,jsp에서 문자열 encoding 전환은?

 

A)

 

StringBuffer szBuffer = new StringBuffer();
String str = new String(szBuffer.toString().getBytes("UTF-8"), "EUC-KR");

 

http://download.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html

 

여전히 한글이 깨어진다면 아래 상황을 체크 해 봅니다.

 

1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

 

2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

 

3. <Connector URIEncoding="UTF-8" connectionTimeout="10000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
4. URIEncoding 세팅을 해 놓아도 get/post 메소드로 넘어갈때 Parameter값 한글이 깨어질때는

 

SetCharacterEncodingFilter.java 파일을 $CATALINA_HOME/common/classes (톱캣) 또는 WEB-INF/classes (개인환경) 밑에

 

javac SetCharacterEncodingFilter.java -d .

 

컴파일을 하고 web.xml 파일 encoding 필터 세팅이 되어 있는지 확인 해 봅니다.

 

* utf8 톰캣이 아니라면 톰캣 4.x 은 기본적으로 8859_1로구동이 됩니다. export LANG=en_US.iso8859-1

 

export LANG=ko_KR.eucKR 으로 한다면 charset은 euc-kr로 구동이 됩니다.

 

추가 옵션으로 export CATALINA_OPTS='-Dencoding.default=euc-kr -Dfile.encoding=euc-kr'

 

 

 

 

 

Q) 윈도우 노트패드(notepad)에서 encoding 변환 작업은 할 수 없나요?

 

A) 윈도우에서 작업 가능한 무료 에디터 notepad++를 소개 해 드립니다.

 

http://notepad-plus-plus.org/ 접속 후 다운로드(DOWNLOAD) 메뉴에서 받으시면 됩니다.

 

윈도우에서 생성한 ANSI Encoding 파일을 상단 메뉴 Encoding 에서

 

Convert to UTF-8 without BOM (UTF-8 형식으로 변환 BOM 없음) 으로 선택하시면 UTF-8 Charset 으로 변환이 됩니다.

 

 




 

(notepad++ 메뉴를 한글로 변경 Settings > Preferences > General Localization 셀렉터 항목에 한국어를 선택하면 됩니다.)

 

 

 


(추가)

 

Q) 여러 사이트에서 넘어 오는 값이 각각 다른데 utf8 인지 euc-kr 인지 어떻게 알죠?

 

A) php 경우라면 mb_detect_encoding($str); 로 찍어 보면 압니다.

 

하여 각각 원하는 encoding을 iconv로 변환을 해 주면 됩니다.

반응형

'develop > linux' 카테고리의 다른 글

vi 자동으로 encoding 설정  (0) 2024.03.07
TTFB 체크 명령어  (0) 2016.02.16
GNU C, __attribute__  (0) 2014.10.14
Linux C에서 키보드 이벤트 받기(kbhit())  (0) 2014.02.28
NAT 종류별 설정  (0) 2014.02.17

+ Recent posts