Monday, September 30, 2013

tumblr의 observer theme에서 이미지 경계 없애는 법

tumblr의 observer theme 는 가장 미니멀리즘적인 디자인이라 유용한데, 이걸 사용할때 Safari로 보면 괜찮지만 윈도우에서 익스플로러로 보면 photo 로 올린 사진들의 테두리가 굵게 나타난다.
이 테두리를 없애려면 Customize 로 들어가서 Edit Html 버튼을 누르고
.photo img, .album-art img, .videoWrapper {

}
가 있는 곳으로 찾아가 그 안에다가 border: none; 한줄을 추가하면 된다.

TextWrangler 에서 두 파일 비교하는 법

diff 또는 WinMerge 와 비슷하게 두 텍스트 파일을 비교하는 것을 별도의 유틸리티를 안깔고 TextWrangler 에서 하는 방법이 있다.
1. 비교하고자 하는 두 파일을 열고
2. 한 파일을 new window 로 띄운 후
3. 메뉴 > Search > Compare Two Front Windows
하면 된다.
키워드 : 텍스트 파일, 비교, compare, comparison, text file

Friday, September 27, 2013

트릴리안 메신저

꽤 평이 좋은 통합메신저. 맥 사용자들에게도 좋을듯하다.
한편 대다수의 맥 사용자는 Adium 통합메신저를 추천한다고 함.
맥북에어 사용기 및 활용팁 - 쓸만한 맥용 메신저
강력한 통합 메신저 trillian (트릴리안) + 메신저,메일,스카이프,트위터,페이스북 등 모든 기능을 하나로!
트릴리안 홈페이지 : https://www.trillian.im

Thursday, September 19, 2013

iOS7 정식 출시

iOS7 정식 출시, 유료 어플을 무료로 사용?…네티즌 반응 폭발!
MBN 2013-09-19 15:35
애플 iOS7로 업데이트하면 사용자 인터페이스가 플랫디자인으로 바뀌고, 안드로이드 토글 기능과 유사한 제어센터가 추가되면서 멀티태스킹 기능이 강화됩니다. 또한 그동안 유료 앱이었던 사진 편집 프로그램 ‘아이포토’ 영상 편집 프로그램 ‘아이무비’와 업무용 프로그램 모음 ‘아이웍스’(iWorks) 등의 5개 앱 역시 무료로 제공됩니다... 전세계 애플 기기 이용자들의 업데이트 수요가 한꺼번에 몰리면서 와이파이를 이용한 정식버전 업데이트는 정상적으로 이뤄지지 않는 상황. 이에 애플 기기 보유자들은 아이튠즈를 이용한 업데이트로 방향을 돌리기 시작했습니다. PC의 아이튠즈를 실행한 후 ‘업데이트 확인’을 누르면 아이튠즈가 먼저 11.1버전으로 업데이트 된 뒤 이 PC와 연결 된 애플 기기의 소프트웨어를 업데이트 할 수 있습니다.

Wednesday, September 18, 2013

스마트폰, 10초면 다 뚫린다···직접 해킹해보니

스마트폰, 10초면 다 뚫린다···직접 해킹해보니
아시아경제 2013.04.19 17:46기사입력 2013.04.19 13:42
홍동철 에스이웍스 이사는 "안드로이드 스마트폰은 소스코드가 외부에 공개됐고 애플리케이션(이하 앱) 검수도 철저하지 않기 때문에 해킹에 취약한 구조"라며 "사용자들은 의심스러운 문자나 앱에는 접근조차 하지 않아야 한다"고 말했다.

Sunday, September 15, 2013

웹 브라우저의 기본 글꼴, 가독성 좋은 글꼴로 바꾸자

웹 브라우저의 기본 글꼴, 가독성 좋은 글꼴로 바꾸자
"인터넷 익스플로러, 크롬, 파이어폭스, 오페라, 사파리의 기본 글꼴을 바꾸어 가독성이 더 좋게 만들어 봅시다. 기본 글꼴을 바꾸면 트위터의 기본 글꼴도 바뀝니다. 맑은 고딕, 나눔 고딕을 추천합니다."
→ 나눔명조도 좋다.
키워드 : 폰트, 맑은고딕, 나눔고딕

Saturday, September 14, 2013

폰트 관련

나눔명조 (Nanum Myeongjo) 가 가독성이 좋다.
폰트통 http://macnews.tistory.com/1129
참고 : 나눔고딕
키워드 : 나눔글꼴, 네이버

Friday, August 30, 2013

네이버 댓글모음 비공개하는 법

http://m.naver.com 으로 들어간다.
아무 댓글이나 하나 쓰고 댓글에서 자신의 아이디를 클릭한다.
"나의 댓글목록 공개" 를 On 에서 Off 로 바꾼다.
링크 : 네이버 댓글모음 비공개하는 법

Sunday, August 18, 2013

Squarespace

Squarespace: Build a Website
http://www.squarespace.com


Squarespace is the easiest way for anyone to create an exceptional website. 
유료 서비스임

Saturday, August 17, 2013

OS X 에서 타이머로 스크린샷 찍는 법

OS X 에 기본으로 탑재되어 있는 Grab 유틸리티를 이용한다.
메뉴에서 Timed Screen 명령을 실행하고 타이머를 시작하면 10초 이후에 스크린샷이 찍힘.
레퍼런스 : Take a Timed Screen Shot in Mac OS X
키워드 : Screenshot, screen capture, Utilities, timer

AppleScript 로 UI Scripting 하는 법 기초

사운드 preference 에서 체크박스를 토글해주는 애플스크립트를 짜보자.

우선 다음과 같이 해서 "Anchor"의 이름들을 알아낼 수 있다.
 tell application "System Preferences"  
      get the name of every anchor of pane id "com.apple.preference.sound"  
 end tell  

Script Editor 아래쪽의 Output 창에는 다음과 같이 찍힌다.
{"output", "input", "effects"}

원하는 체크박스가 "effects" 라는 anchor 밑에 있음을 알았으므로, 다음과 같이
"effects" anchor 가 나타나게 한 후,
체크박스를 클릭하게 만들면 된다.

 tell application "System Preferences"  
      reveal anchor "effects" of pane id "com.apple.preference.sound"  
 end tell  
 tell application "System Events"  
      tell process "System Preferences"  
           click checkbox 1 of tab group 1 of window 1  
      end tell  
 end tell  

응용예) 다음은 이어폰 모드와 스피커 모드를 전환해주는 애플스크립트.
이어폰을 끼기 전에는 볼륨 레벨을 낮추고 F11/F12 키로 갑자기 볼륨이 변화하는걸 막아줌. 스피커 모드를 선택하면 그 반대로 해줌.

 (*  
 on run  
      tell application "System Preferences"  
           get the name of every anchor of pane id "com.apple.preference.keyboard"  
           --> {"keyboardTab", "shortcutsTab", "keyboardTab_ModifierKeys"}  
      end tell  
 end run  
 *)  
 on run  
      set earphoneVolume to 0.1  
      set dialogResult to myMessageBox2ButtonsAndCancel("Change Sound Volume Mode to :", "Earphone", "Speaker")  
      if (dialogResult = "Cancelled") then  
           display dialog dialogResult giving up after 1  
      else  
           -- Enable Assistive Devices via Terminal   
           do shell script ¬  
                "touch /private/var/db/.AccessibilityAPIEnabled" password "q" with administrator privileges  
           if (dialogResult = "Earphone") then  
                set volume earphoneVolume  
                changeMode(1)  
                display dialog ("EARPHONE mode (Volume settings and Function key settings). volume set to " & earphoneVolume) giving up after 1  
           else  
                set volume (earphoneVolume * 2)  
                changeMode(0)  
                display dialog "SPEAKER mode (Volume settings and Function key settings)" giving up after 1  
           end if  
      end if  
 end run  
 on changeMode(earphoneMode)  
      set headphoneMode to 1 - earphoneMode  
      tell application "System Preferences"  
           set current pane to pane "com.apple.preference.keyboard"  
           reveal anchor "keyboardTab" of pane id "com.apple.preference.keyboard"  
      end tell  
      tell application "System Events"  
           if UI elements enabled then  
                tell tab group 1 of window "Keyboard" of process "System Preferences"  
                     if value of checkbox "Use all F1, F2, etc. keys as standard function keys" is headphoneMode then  
                          click checkbox "Use all F1, F2, etc. keys as standard function keys"  
                          --display dialog "clicked checkbox" giving up after 1  
                     end if  
                end tell  
           else  
                tell application "System Preferences"  
                     set current pane ¬  
                          to pane "com.apple.preference.universalaccess"  
                     display dialog ¬  
                          "UI element scripting is not enabled. Check \"Enable access for assistive devices\""  
                end tell  
           end if  
      end tell  
 end changeMode  
 on myMessageBox2ButtonsAndCancel(msg, buttonL, buttonR)  
      set userCanceled to false  
      try  
           set dialogResult to ¬  
                display dialog msg buttons {"Cancel", buttonL, buttonR} ¬  
                     default button buttonR cancel button ¬  
                     "Cancel" with title ""  
      on error number -128  
           set userCanceled to true  
      end try  
      if userCanceled then  
           return "Cancelled"  
      else  
           button returned of dialogResult  
      end if  
 end myMessageBox2ButtonsAndCancel  


키워드 : UI Scripting
레퍼런스 :
Modifying “User interface sound effects” with applescript
Why does this applescript not actually set the input volume to zero?
AppleScript Essentials - User Interface Scripting by Benjamin S. Waldie
Applescript 10.7:Can’t get anchor “FileVault” of pane id “com.apple.preference.security”

레퍼런스 (볼륨 관련):
Set incredibly precise volume levels using AppleScript
http://hints.macworld.com/article.php?story=20100226174946948

Applescript to toggle F1-F11 keys as function keys
http://forums.macrumors.com/showthread.php?t=383969

Enable and disable Assistive Devices via Terminal
http://hints.macworld.com/article.php?story=20060203225241914

Friday, August 16, 2013

TextMate 에서 현재 날짜 입력하는 방법

isoD 라고 입력하고 tab 을 치면 된다.
isoD 란, ISO 표준 형식의 date 를 말한다.
예를 들어 02/04/03 의 경우
2nd of April 2003 (European style)
4th of February 2003 (USA style)
3rd of April 2002
와 같이 여러가지로 해석될 수 있는데, 이런 혼란을 방지하기 위해
날짜 포맷을 YYYY-MM-DD 로 표준화한 것이 ISO date format 이다.
키워드 : textmate current date shortcut

Thursday, August 15, 2013

Perl 에서 Array 에 element 를 add 하기

 sub addElmtToArray  
 {  
      my $pa = shift;  
      my $elmt = shift;  
      $pa->[scalar(@$pa)] = $elmt;  
 }  
키워드 : append

Perl 에서 element 를 remove 하기

 sub removeArrayElmt  
 {  
      my $array = shift;  
      my $index = shift;  
      splice(@$array, $index, 1);       
 }  
출처 : http://perlmaven.com/splice-to-slice-and-dice-arrays-in-perl

Monday, August 12, 2013

Thursday, August 8, 2013

OS X 의 Sound 볼륨 컨트롤 관련 팁

1. Option+Shift 를 누르고 볼륨을 컨트롤하면 더 미세하게 조정된다
2. 헤드폰 사용시 실수로 볼륨을 키우고 싶지 않다면
System Preference > Keyboard 에 가서 "Use all F1, F2, ... keys as standard function keys" 의 체크를 켜준다 (그러면 F11, F12 로 볼륨 크기 조절하려면 Fn 버튼을 같이 눌러야 한다)
키워드 : 소리 크기 조절, 사운드
검색어 : google > os x volume smaller increments

Wednesday, August 7, 2013

특정 개수 문자를 제외한 부분을 얻어내는 regular expression

뒷부분 6개의 문자를 제외한 것을 추출하는 regular expression
      $num =~ m/^(\d+)(\d{6})$/;  
      print $1; print "\n";  
      print $2; print "\n";  

Regular expressions in Perl


Regular expressions in Perl

This document presents a tabular summary of the regular expression (regexp) syntax in Perl, then illustrates it with a collection of annotated examples.

Metacharacters

charmeaning
^beginning of string
$end of string
.any character except newline
*match 0 or more times
+match 1 or more times
?match 0 or 1 times; or: shortest match
|alternative
( )grouping; “storing”
[ ]set of characters
{ }repetition modifier
\quote or special
To present a metacharacter as a data character standing for itself, precede it with \ (e.g. \.matches the full stop character . only).
In the table above, the characters themselves, in the first column, are links to descriptions of characters in my The ISO Latin 1 character repertoire - a description with usage notes. Note that the physical appearance (glyph) of a character may vary from one device or program or font to another.

Repetition

a*zero or more a’s
a+one or more a’s
a?zero or one a’s (i.e., optional a)
a{m}exactly m a’s
a{m,}at least m a’s
a{m,n}at least m but at most n a’s
repetition?same as repetition but the shortestmatch is taken
Read the notation a’s as “occurrences of strings, each of which matches the pattern a”. Read repetition as any of the repetition expressions listed above it. Shortest match means that the shortest string matching the pattern is taken. The default is “greedy matching”, which finds the longest match. The repetition? construct was introduced in Perl version 5.

Special notations with \

Single characters
\ttab
\nnewline
\rreturn (CR)
\xhhcharacter with hex. code hh
“Zero-width assertions”
\b“word” boundary
\Bnot a “word” boundary
Matching
\wmatches any single character classified as a “word” character (alphanumeric or “_”)
\Wmatches any non-“word” character
\smatches any whitespace character (space, tab, newline)
\Smatches any non-whitespace character
\dmatches any digit character, equiv. to [0-9]
\Dmatches any non-digit character

Character sets: specialities inside [...]

Different meanings apply inside a character set (“character class”) denoted by [...] so that, instead of the normal rules given here, the following apply:
[characters]matches any of the characters in the sequence
[x-y]matches any of the characters from x to y (inclusively) in the ASCII code
[\-]matches the hyphen character “-”
[\n]matches the newline; other single character denotations with \ apply normally, too
[^something]matches any character except those that [something] denotes; that is, immediately after the leading “[”, the circumflex “^” means “not” applied to all of the rest

Examples

expressionmatches...
abcabc (that exact character sequence, but anywhere in the string)
^abcabc at the beginning of the string
abc$abc at the end of the string
a|beither of a and b
^abc|abc$the string abc at the beginning or at the end of the string
ab{2,4}can a followed by two, three or four b’s followed by a c
ab{2,}can a followed by at least two b’s followed by a c
ab*can a followed by any number (zero or more) of b’s followed by a c
ab+can a followed by one or more b’s followed by a c
ab?can a followed by an optional b followed by a c; that is, either abc or ac
a.can a followed by any single character (not newline) followed by a c
a\.ca.c exactly
[abc]any one of a, b and c
[Aa]bceither of Abc and abc
[abc]+any (nonempty) string of a’s, b’s and c’s (such as a, abba, acbabcacaa)
[^abc]+any (nonempty) string which does not contain any of a, b and c (such as defg)
\d\dany two decimal digits, such as 42; same as \d{2}
\w+a “word”: a nonempty sequence of alphanumeric characters and low lines (underscores), such as foo and 12bar8 and foo_1
100\s*mkthe strings 100 and mk optionally separated by any amount of white space (spaces, tabs, newlines)
abc\babc when followed by a word boundary (e.g. in abc! but not in abcd)
perl\Bperl when not followed by a word boundary (e.g. in perlert but not in perl stuff)

Examples of simple use in Perl statements

These examples use very simple regexps only. The intent is just to show contexts where regexps might be used, as well as the effect of some “flags” to matching and replacements. Note in particular that matching is by defaultcase-sensitive (Abc does not match abc unless specified otherwise).
s/foo/bar/;
replaces the first occurrence of the exact character sequence foo in the “current string” (in special variable $_) by the character sequence bar; for example, foolish bigfoot would become barlish bigfoot
s/foo/bar/g;
replaces any occurrence of the exact character sequence foo in the “current string” by the character sequence bar; for example, foolish bigfoot would become barlish bigbart
s/foo/bar/gi;
replaces any occurrence of foo case-insensitively in the “current string” by the character sequence bar(e.g. Foo and FOO get replaced by bar too)
if(m/foo/)...
tests whether the current string contains the string foo



출처 : http://www.cs.tut.fi/~jkorpela/perl/regexp.html