- osx - How to tell full path of file on Mac? - Super User
- 여기 방법 써봤지만 그냥 복사하고 text만 입력할 수 있는 곳에 붙여넣기 하면 자동으로 file path만 남네..
- 굳이 file path를 얻기 위해서 고생할 필요없다..!!
- 지금까지 괜히 파일 정보 열어서 일일이 path를 복사했는데 다 부질없는 짓이었다..
- 단, 파일 정보를 복사했으니까 text만 입력할 수 있는 곳에 입력해야 파일이 완전히 복사되는 것을 막을 수 있다.
- Remove Styles로 붙여넣기 하면 되나 그냥 text만 입력할 수 있는 곳에 하는게 더 빠름... 아니면 라이브러리 열어서 선택하든가.. 자주 안 쓰니까. ok!!
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/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# markdown toc generator, v1.8 | |
# | |
# Jaemok Jeong, 2014/10/27 | |
from AppKit import NSPasteboard, NSArray | |
import re | |
import argparse |
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/bin/python | |
""" | |
brute force get title of web page | |
usage: getTitle.py url | |
Gordon Meyer January 1, 2013 | |
www.gordonmeyer.com | |
""" | |
# modules used | |
import urllib2, urlparse, string, os |
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
# Keep in mind that when asking for a `return` after another, only the first one will be output. | |
# This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
# Google Chrome | |
tell application "Google Chrome" to return URL of active tab of front window | |
tell application "Google Chrome" to return title of active tab of front window | |
# Google Chrome Canary | |
tell application "Google Chrome Canary" to return URL of active tab of front window | |
tell application "Google Chrome Canary" to return title of active tab of front window | |
# Chromium |
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
------------------------------------------------------------------------------------------- | |
REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2015/07/08 23:26 | |
------------------------------------------------------------------------------------------- | |
NOTES | |
------------------------------------------------------------------------------------------- | |
AppleScript is a rather peculiar scripting language to learn. |
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
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
- p.146
- 책에서는 계속 임시 변수 사용을 줄이라고 하는데 왜 임시변수 사용을 줄여야 하는가?
- 내가 보기에는 outstanding 이라는 임시변수를 만들어 놓으면 outstanding 임시변수만 수정하게 되면 편하게 get_outstanding의 매개변수를 변경할 수 있어서 편한다고 생각이 들고 이게 좀 더 소스코드를 읽기 좋다고 생각한다.
- 책에서 말하는 refactoring을 하면 get_outstanding의 파라미터를 변경하려면 keyboard 키를 몇 번 더 움직여야 하고 직관적이지 못하다.
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/bin/env python3 | |
from urllib.parse import quote, unquote | |
str1 = '인코딩 제발ㅠㅠ' | |
str1.encode('euc-kr') | |
# b'\xc0\xce\xc4\xda\xb5\xf9 \xc1\xa6\xb9\xdf\xa4\xd0\xa4\xd0' | |
str_euckr = quote(str1.encode('euc-kr')) | |
str_euckr | |
# '%C0%CE%C4%DA%B5%F9%20%C1%A6%B9%DF%A4%D0%A4%D0' |