2015.10.15 17:55

아파치 SSL 인증서에서 비밀번호 삭제하기

Every once in a while I run across an SSL Cert with an included password. Although the security is great automating an environment or an Apache restart with required interaction is problematic.


Here is an example of the interaction with a password included SSL Cert:

---------------------------------------------------------------

[root@w2 conf.d]# /etc/init.d/httpd restart

Stopping httpd:                                            [  OK  ]

Starting httpd: Apache/2.2.8 mod_ssl/2.2.8 (Pass Phrase Dialog)

Some of your private key files are encrypted for security reasons.

In order to read them you have to provide the pass phrases.

Server chrisschuld.com:443 (RSA)

Enter pass phrase:

OK: Pass Phrase Dialog successful.


And here is how you remove the password:

---------------------------------------------------------------

[root@w2 conf]# openssl rsa -in chrisschuld.com.key -out chrisschuld.com.key.nopass


[출처] REMOVING THE PASSWORD ON AN APACHE SSL CERTIFICATE

Trackback 0 Comment 0
2015.10.02 09:17

이미지를 url을 통해 load 하기

1. 이미지를 load하는 asynctask 추가

private class DownloadImageTask extends AsyncTask {
	ImageView bmImage;

	public DownloadImageTask(ImageView bmImage) {
		this.bmImage = bmImage;
	}

	protected Bitmap doInBackground(String... urls) {
		String urldisplay = urls[0];
		Bitmap mIcon11 = null;
		try {
			InputStream in = new java.net.URL(urldisplay).openStream();
			mIcon11 = BitmapFactory.decodeStream(in);
		} catch (Exception e) {
			Log.e("Error", e.getMessage());
			e.printStackTrace();
		}
		return mIcon11;
	}

	protected void onPostExecute(Bitmap result) {
		bmImage.setImageBitmap(result);
	}
}


2. ListView의 getView에서 호출

new DownloadImageTask(imageView).execute("url.....");


[출처] Load image from url

Trackback 0 Comment 0
2015.08.06 17:11

안드로이드 투명도 코드

투명도 적용전

<color name="black">#000000</color>

투명도 적용후

<color name="black">#99000000</color> 


Hex Code

100% — FF

95% — F2

90% — E6

85% — D9

80% — CC

75% — BF

70% — B3

65% — A6

60% — 99

55% — 8C

50% — 80

45% — 73

40% — 66

35% — 59

30% — 4D

25% — 40

20% — 33

15% — 26

10% — 1A

5% — 0D

0% — 00

Trackback 0 Comment 0
2015.07.13 13:45

페도라 20, 19 호스트 이름변경

1. hostnamectl status를 이용해 현재 호스트 이름을 확인

2. hostnamestl set-hostname을 이용해 호스트 이름 변경

hostnamectl set-hostname --pretty new_hostname

hostnamectl set-hostname --transient new_hostname

hostnamectl set-hostname --static new_hostname


콘솔상에서 보여지는 호스트 이름만 변경하려면 transient만으로 충분


[출처] How To Change Hostname In Fedora 20, 19

Trackback 0 Comment 1
2015.07.09 14:43

웹뷰에서 텍스트 선택 막는 법

페이지에 아래의 css 추가

* {
   -webkit-user-select: none;
}


[출처] Android: Disable text selection in a webview

Trackback 0 Comment 0