반응형
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
반응형

출처: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
반응형

출처: http://bitxflow.synology.me/wordpress/?p=311%20

swift: https://indra17.tistory.com/entry/ios-%ED%83%88%EC%98%A5%ED%8F%B0-%EC%B2%B4%ED%81%ACswift

+(BOOL)isJailbroken{
#if !(TARGET_IPHONE_SIMULATOR)
    if ([[NSFileManager defaultManager] fileExistsAtPath:@”/Applications/Cydia.app”]){
        return YES;
    }else if([[NSFileManager defaultManager] fileExistsAtPath:@”/Library/MobileSubstrate/MobileSubstrate.dylib”]){
        return YES;
    }else if([[NSFileManager defaultManager] fileExistsAtPath:@”/bin/bash”]){
        return YES;
    }else if([[NSFileManager defaultManager] fileExistsAtPath:@”/usr/sbin/sshd”]){
        return YES;
    }else if([[NSFileManager defaultManager] fileExistsAtPath:@”/etc/apt”]){
        return YES;
    }
    return NO;

    NSError *error;
    NSString *stringToBeWritten = @"This is a test.";
    [stringToBeWritten writeToFile:@”/private/jailbreak.txt” atomically:YES encoding:NSUTF8StringEncoding error:&error];
    if(error==nil){
        //Device is jailbroken
        return YES;
    } else {
        //Device is not jailbroken
        [[NSFileManager defaultManager] removeItemAtPath:@”/private/jailbreak.txt” error:nil];
    }
    if([[UIApplication sharedApplication] canOpenUrl: [NSURL URLWithString:@”cydia://package/com.example.package”]]){
        //Device is jailbroken
    }
#endif
  
    //All checks have failed. Most probably, the device is not jailbroken
    return NO;
}
반응형

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

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

+ Recent posts